Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Commit d8afa30

Browse files
author
Manuele Vaccari
committed
Added different versions for phpunit and fixed tests
1 parent 6166ea6 commit d8afa30

4 files changed

Lines changed: 55 additions & 42 deletions

File tree

composer.json

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
{
2-
"name": "excelwebzone/recaptcha-bundle",
3-
"description": "This bundle provides easy reCAPTCHA form field integration",
4-
"keywords": ["recaptcha"],
5-
"homepage": "https://github.com/excelwebzone/EWZRecaptchaBundle",
6-
"type": "symfony-bundle",
7-
"license": "MIT",
8-
"authors": [
9-
{
10-
"name": "Michael H. Arieli",
11-
"email": "excelwebzone@gmail.com",
12-
"homepage": "http://excelwebzone.com/"
2+
"name": "excelwebzone/recaptcha-bundle",
3+
"description": "This bundle provides easy reCAPTCHA form field integration",
4+
"keywords": ["recaptcha"],
5+
"homepage": "https://github.com/excelwebzone/EWZRecaptchaBundle",
6+
"type": "symfony-bundle",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Michael H. Arieli",
11+
"email": "excelwebzone@gmail.com",
12+
"homepage": "http://excelwebzone.com/"
13+
}
14+
],
15+
"require": {
16+
"php": ">=5.6 || ^7.0",
17+
"google/recaptcha": "^1.1",
18+
"symfony/form": "^2.8 || ^3.0 || ^4.0",
19+
"symfony/security": "^2.8 || ^3.0 || ^4.0",
20+
"symfony/validator": "^2.8 || ^3.0 || ^4.0",
21+
"symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0"
22+
},
23+
"require-dev": {
24+
"phpunit/phpunit": "^5 || ^6 || ^7"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"EWZ\\Bundle\\RecaptchaBundle\\": "src"
29+
}
30+
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"EWZ\\Tests\\Bundle\\RecaptchaBundle\\": "tests"
34+
}
1335
}
14-
],
15-
"require": {
16-
"php": ">=5.6 || ^7.0",
17-
"symfony/form": "^2.8 || ^3.0 || ^4.0",
18-
"symfony/security": "^2.8 || ^3.0 || ^4.0",
19-
"symfony/validator": "^2.8 || ^3.0 || ^4.0",
20-
"symfony/framework-bundle": "^2.8 || ^3.0 || ^4.0"
21-
},
22-
"require-dev": {
23-
"phpunit/phpunit": "~5.3"
24-
},
25-
"autoload": {
26-
"psr-4": {
27-
"EWZ\\Bundle\\RecaptchaBundle\\": "src"
28-
}
29-
},
30-
"autoload-dev": {
31-
"psr-4": {
32-
"EWZ\\Tests\\Bundle\\RecaptchaBundle\\": "tests"
33-
}
34-
}
3536
}

phpunit.xml.dist

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
3-
4-
<testsuites>
5-
<testsuite name="EWZRecaptchaBundle">
6-
<directory>tests/</directory>
7-
</testsuite>
8-
</testsuites>
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.0/phpunit.xsd"
5+
bootstrap="./tests/bootstrap.php"
6+
colors="true">
7+
8+
<testsuites>
9+
<testsuite name="EWZRecaptchaBundle">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
14+
<filter>
15+
<whitelist>
16+
<directory suffix=".php">src</directory>
17+
</whitelist>
18+
</filter>
919

1020
</phpunit>

tests/Form/Type/EWZRecaptchaTypeTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType;
66
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
7+
use PHPUnit\Framework\TestCase;
78
use Symfony\Component\Form\Extension\Core\Type\TextType;
89
use Symfony\Component\Form\FormInterface;
910
use Symfony\Component\Form\FormView;
1011
use Symfony\Component\HttpFoundation\RequestStack;
1112
use Symfony\Component\OptionsResolver\OptionsResolver;
1213

13-
class EWZRecaptchaTypeTest extends \PHPUnit_Framework_TestCase
14+
class EWZRecaptchaTypeTest extends TestCase
1415
{
1516
/** @var EWZRecaptchaType */
1617
protected $type;

tests/Locale/LocaleResolverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
namespace EWZ\Tests\Bundle\RecaptchaBundle\Locale;
44

55
use EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver;
6+
use PHPUnit\Framework\TestCase;
67
use Symfony\Component\HttpFoundation\Request;
78
use Symfony\Component\HttpFoundation\RequestStack;
89

9-
class LocaleResolverTest extends \PHPUnit_Framework_TestCase
10+
class LocaleResolverTest extends TestCase
1011
{
1112
/**
1213
* @test

0 commit comments

Comments
 (0)