Codeception / lib-innerbrowser

InnerBrowser
MIT License
80 stars 20 forks source link

PHPUnit 9 compatibility #7

Closed Naktibalda closed 4 years ago

Naktibalda commented 4 years ago

The following tests fail after upgrade to PHPUnit 9

1) FrameworksTest: See in field with boolean Test tests/unit/Codeception/Module/FrameworksTest.php:testSeeInFieldWithBoolean Failed asserting that `` is in input's value: array ( 0 => '', ) Failed asserting that an array contains false.

1 PHPUnit\Framework\Assert::assertContains

2 /c/Projects/lib-innerbrowser/tests/unit/Codeception/Module/TestsForWeb.php:524


2) FrameworksTest: See in form fields Test tests/unit/Codeception/Module/FrameworksTest.php:testSeeInFormFields Failed asserting that `` is in input's value: array ( 0 => '', ) Failed asserting that an array contains false.

1 PHPUnit\Framework\Assert::assertContains

2 /c/Projects/lib-innerbrowser/tests/unit/Codeception/Module/TestsForWeb.php:609


3) FrameworksTest: Checking options with complex names Test tests/unit/Codeception/Module/FrameworksTest.php:testCheckingOptionsWithComplexNames Failed asserting that an array contains 4.

1 /c/Projects/lib-innerbrowser/tests/unit/Codeception/Module/TestsForWeb.php:1419

Naktibalda commented 4 years ago

in PHPUnit 9, assertContains uses === for comparison, so false does not match '' and 4 does not match '4'.

Naktibalda commented 4 years ago

Fixed by #8