File tree Expand file tree Collapse file tree 8 files changed +35
-8
lines changed Expand file tree Collapse file tree 8 files changed +35
-8
lines changed Original file line number Diff line number Diff line change 3939 # Docs: https://getcomposer.org/doc/articles/scripts.md
4040
4141 - name : Run test suite
42- run : composer run-script test
42+ run : composer run-script coverage
Original file line number Diff line number Diff line change 4747 # Docs: https://getcomposer.org/doc/articles/scripts.md
4848
4949 - name : Run test suite
50- run : composer run-script test
50+ run : composer run-script coverage
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ composer.lock
1010
1111/coverage
1212/.phpunit.cache
13+ /coverage.xml
Original file line number Diff line number Diff line change 3737 "phpunit/phpunit" : " ^8"
3838 },
3939 "scripts" : {
40- "test" : " vendor/bin/phpunit tests --coverage-html coverage --coverage-clover coverage.xml"
40+ "test" : " @php vendor/bin/phpunit tests" ,
41+ "coverage" : " @test --coverage-html coverage --coverage-clover coverage.xml" ,
42+ "php-version" : " @php --version"
4143 }
4244}
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/8.5/phpunit.xsd"
4+ bootstrap =" vendor/autoload.php"
5+ cacheResultFile =" .phpunit.cache/test-results"
6+ executionOrder =" depends,defects"
7+ forceCoversAnnotation =" true"
8+ beStrictAboutCoversAnnotation =" false"
9+ beStrictAboutOutputDuringTests =" false"
10+ beStrictAboutTodoAnnotatedTests =" false"
11+ convertDeprecationsToExceptions =" true"
12+ verbose =" true" >
13+ <testsuites >
14+ <testsuite name =" default" >
15+ <directory >tests</directory >
16+ </testsuite >
17+ </testsuites >
18+
19+ <filter >
20+ <whitelist processUncoveredFilesFromWhitelist =" true" >
21+ <directory suffix =" .php" >src</directory >
22+ </whitelist >
23+ </filter >
24+ </phpunit >
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Alezhu \PHPUnitArrayContainsAsserts \Constraint \ Tests ;
3+ namespace Alezhu \PHPUnitArrayContainsAsserts \Tests \ Constraint ;
44
55use Alezhu \PHPUnitArrayContainsAsserts \Constraint \ArrayContainsBase ;
66use ArrayAccess ;
@@ -20,7 +20,7 @@ public function isAssocArray($array): bool
2020 return parent ::_isAssocArray ($ array );
2121 }
2222
23- public function toArray ($ value )
23+ public function toArray ($ value ): array
2424 {
2525 return parent ::_toArray ($ value );
2626 }
@@ -204,7 +204,7 @@ public function test_toArray_should_throw_exception_4_non_array_like_type()
204204 $ value = "1,2,3 " ;
205205 $ this ->expectException (AssertionFailedError::class);
206206 $ this ->expectExceptionMessage ('Not supported type ' );
207- $ result = $ instance ->toArray ($ value );
207+ $ instance ->toArray ($ value );
208208
209209 }
210210}
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Alezhu \PHPUnitArrayContainsAsserts \Constraint \ Tests ;
3+ namespace Alezhu \PHPUnitArrayContainsAsserts \Tests \ Constraint ;
44
55use Alezhu \PHPUnitArrayContainsAsserts \Constraint \ArrayContainsOnly ;
66use PHPUnit \Framework \ExpectationFailedException ;
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Alezhu \PHPUnitArrayContainsAsserts \Constraint \ Tests ;
3+ namespace Alezhu \PHPUnitArrayContainsAsserts \Tests \ Constraint ;
44
55use Alezhu \PHPUnitArrayContainsAsserts \Constraint \ArrayContains ;
66use PHPUnit \Framework \AssertionFailedError ;
You can’t perform that action at this time.
0 commit comments