Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

PhpUnit 8 support #59

Merged
merged 2 commits into from
Feb 21, 2019
Merged

PhpUnit 8 support #59

merged 2 commits into from
Feb 21, 2019

Conversation

Naktibalda
Copy link
Member

I solved signature change problem with setUp, tearDown and setUpBeforeClass,
but I have no idea how to solve a problem of final class declarations.

PHP Fatal error: Class Codeception\PHPUnit\Runner may not inherit from final class (PHPUnit\TextUI\TestRunner)
Other final class that we used to extend are \PHPUnit\Runner\Filter\NameFilterIterator and \PHPUnit\Util\Log\JUnit.

@Naktibalda Naktibalda changed the base branch from 7.1 to 8.0 February 7, 2019 19:06
@Naktibalda Naktibalda mentioned this pull request Feb 11, 2019
@Naktibalda Naktibalda changed the title PhpUnit support [WIP] PhpUnit 8 support Feb 14, 2019
@Naktibalda Naktibalda requested a review from DavertMik February 14, 2019 16:34
Copy link
Member

@DavertMik DavertMik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Overriding final classes is the only option.
At least there was not too much thing to override.

@b1rdex
Copy link
Contributor

b1rdex commented Feb 15, 2019

Some tests are failed becuase sebastianbergmann/php-code-coverage#667 is not released yet.

@b1rdex
Copy link
Contributor

b1rdex commented Feb 19, 2019

sebastianbergmann/php-code-coverage 7.0.2 tagged with fix fix of type errors.

@Naktibalda
Copy link
Member Author

@b1rdex now the tests are failing because of Codeception/Codeception#5397

@Naktibalda
Copy link
Member Author

And one more thing to fix:
[PHPUnit\Framework\Warning] Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
PHPUnit Warning counts as failure, so it is necessary to replace all assertContains with string haystack with something else.

@Naktibalda Naktibalda merged commit e963542 into 8.0 Feb 21, 2019
@Naktibalda Naktibalda deleted the test-phpunit-8 branch February 21, 2019 21:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants