File tree Expand file tree Collapse file tree 8 files changed +33
-15
lines changed
Expand file tree Collapse file tree 8 files changed +33
-15
lines changed Original file line number Diff line number Diff line change 44 pull_request :
55 push :
66 branches :
7- - " master "
7+ - " main "
88
99jobs :
1010 phpunit :
2020 php-version :
2121 - " 7.3"
2222 - " 7.4"
23+ - " 8.0"
2324 operating-system :
2425 - " ubuntu-latest"
2526
@@ -45,15 +46,15 @@ jobs:
4546
4647 - name : " Install lowest dependencies"
4748 if : ${{ matrix.dependencies == 'lowest' }}
48- run : " composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
49+ run : " composer update --prefer-lowest --no-interaction --no-progress --no-suggest --ignore-platform-reqs "
4950
5051 - name : " Install highest dependencies"
5152 if : ${{ matrix.dependencies == 'highest' }}
52- run : " composer update --no-interaction --no-progress --no-suggest"
53+ run : " composer update --no-interaction --no-progress --no-suggest --ignore-platform-reqs "
5354
5455 - name : " Install locked dependencies"
5556 if : ${{ matrix.dependencies == 'locked' }}
56- run : " composer install --no-interaction --no-progress --no-suggest"
57+ run : " composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs "
5758
5859 - name : " Tests"
5960 run : " vendor/bin/phpunit"
Original file line number Diff line number Diff line change 1+ .phpunit.result.cache
12clover.xml
23composer.lock
34phpunit.xml
Original file line number Diff line number Diff line change 1111 }
1212 ],
1313 "require" : {
14- "php" : " ^7.1 " ,
14+ "php" : " ^7.3 || ^8.0 " ,
1515 "ext-dom" : " *" ,
1616 "ext-libxml" : " *" ,
1717 "psr/container" : " ^1.0" ,
1818 "psr/http-message" : " ^1.0" ,
19- "laminas/laminas-filter" : " ^2.7.2 " ,
19+ "laminas/laminas-filter" : " ^2.9 " ,
2020 "laminas/laminas-i18n" : " ^2.7" ,
21- "laminas/laminas-inputfilter" : " ^2.8.1 " ,
22- "laminas/laminas-servicemanager" : " ^3.0 " ,
21+ "laminas/laminas-inputfilter" : " ^2.8" ,
22+ "laminas/laminas-servicemanager" : " ^3.5 " ,
2323 "laminas/laminas-stdlib" : " ^3.0" ,
2424 "laminas/laminas-uri" : " ^2.5" ,
25- "laminas/laminas-validator" : " ^2.10.2 "
25+ "laminas/laminas-validator" : " ^2.13 "
2626 },
2727 "require-dev" : {
28- "phpunit/phpunit" : " ^7.0 " ,
28+ "phpunit/phpunit" : " ^9.5 " ,
2929 "squizlabs/php_codesniffer" : " ^3.0" ,
30- "phpstan/phpstan" : " ^0.10"
30+ "phpstan/phpstan" : " ^0.12" ,
31+ "phpspec/prophecy-phpunit" : " ^2.0"
3132 },
3233 "suggest" : {
3334 "laminas/laminas-servicemanager" : " To support third-party validators and filters"
Original file line number Diff line number Diff line change 77use DOMDocument ;
88use DOMElement ;
99use PHPUnit \Framework \TestCase ;
10+ use Prophecy \PhpUnit \ProphecyTrait ;
1011use ReflectionMethod ;
1112use Xtreamwayz \HTMLFormValidator \FormElement \Text ;
1213use function iterator_to_array ;
1314
1415class BaseFormElementTest extends TestCase
1516{
17+ use ProphecyTrait;
18+
1619 public function dataAttributesProvider ()
1720 {
1821 return [
Original file line number Diff line number Diff line change 55namespace XtreamwayzTest \HTMLFormValidator ;
66
77use PHPUnit \Framework \TestCase ;
8+ use Prophecy \PhpUnit \ProphecyTrait ;
89use Psr \Http \Message \ServerRequestInterface ;
910use Xtreamwayz \HTMLFormValidator \FormFactory ;
1011use Xtreamwayz \HTMLFormValidator \ValidationResult ;
1516
1617class FormElementArraytest extends TestCase
1718{
19+ use ProphecyTrait;
20+
1821 public function testCheckboxArrayIsValid () : void
1922 {
2023 $ html = '
Original file line number Diff line number Diff line change 1010use Xtreamwayz \HTMLFormValidator \FormFactoryFactory ;
1111use Xtreamwayz \HTMLFormValidator \FormFactoryInterface ;
1212use Laminas \InputFilter \Factory ;
13+ use Prophecy \PhpUnit \ProphecyTrait ;
1314
1415class FormFactoryFactoryTest extends TestCase
1516{
17+ use ProphecyTrait;
18+
1619 /** @var ContainerInterface|ProphecyInterface */
1720 private $ container ;
1821
Original file line number Diff line number Diff line change 1212use Xtreamwayz \HTMLFormValidator \FormInterface ;
1313use Laminas \InputFilter \Factory ;
1414use Laminas \InputFilter \InputFilterInterface ;
15+ use Prophecy \PhpUnit \ProphecyTrait ;
1516
1617class FormFactoryTest extends TestCase
1718{
19+ use ProphecyTrait;
20+
1821 public function testConstructorWithNoArguments () : void
1922 {
2023 $ formFactory = new FormFactory ();
Original file line number Diff line number Diff line change 55namespace XtreamwayzTest \HTMLFormValidator ;
66
77use PHPUnit \Framework \TestCase ;
8+ use Prophecy \PhpUnit \ProphecyTrait ;
89use Psr \Http \Message \ServerRequestInterface ;
910use Xtreamwayz \HTMLFormValidator \FormFactory ;
1011use Xtreamwayz \HTMLFormValidator \ValidationResult ;
1112
1213class FormTest extends TestCase
1314{
15+ use ProphecyTrait;
16+
1417 private $ rawValues = [
1518 'foo ' => 'bar ' ,
1619 'baz ' => ' qux ' ,
@@ -104,8 +107,8 @@ public function testSetValuesStatically() : void
104107 'baz ' => 'qux ' ,
105108 ]);
106109
107- self ::assertContains ('<input type="text" name="foo" value="bar"> ' , $ form ->asString ());
108- self ::assertContains ('<input type="text" name="baz" value="qux"> ' , $ form ->asString ());
110+ self ::assertStringContainsString ('<input type="text" name="foo" value="bar"> ' , $ form ->asString ());
111+ self ::assertStringContainsString ('<input type="text" name="baz" value="qux"> ' , $ form ->asString ());
109112 }
110113
111114 public function testSetValuesWithConstructor () : void
@@ -121,7 +124,7 @@ public function testSetValuesWithConstructor() : void
121124 'baz ' => 'qux ' ,
122125 ]);
123126
124- self ::assertContains ('<input type="text" name="foo" value="bar"> ' , $ form ->asString ());
125- self ::assertContains ('<input type="text" name="baz" value="qux"> ' , $ form ->asString ());
127+ self ::assertStringContainsString ('<input type="text" name="foo" value="bar"> ' , $ form ->asString ());
128+ self ::assertStringContainsString ('<input type="text" name="baz" value="qux"> ' , $ form ->asString ());
126129 }
127130}
You can’t perform that action at this time.
0 commit comments