-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
PHPUnit Assertions #5002
Copy link
Copy link
Closed
Description
Dear @DavertMik and community,
I am trying to migrate my tests from PHPUnit to Codeception CESTs because of its awesome functional and acceptance tests (:+1: ). However, i recently stumbled upon the following issue - maybe you can help me with this?
Consider the following minimal example:
class UserManagerCest
{
/**
* @param UnitTester $I
*/
public function test_if_only_users_are_returned(UnitTester $I)
{
$users = ... // get all users from the database here
$I->assertContainsOnlyInstancesOf(
User::class,
$users
);
}However, this fails, because the UnitTester does not inherit the required assertContainsOnlyInstancesOf() method. Same with many other functions PHPUnit offers (cf. this link here)
What do you suggest to get these PHPUnit-based assertions? I need them because otherwise all my tests will fail, because I also heavily rely on the assertJson...() and other functions..
Thanks in advance for your time and effort,
Cheers!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels