I have a Behat context that extends Behatch\Context\BaseContext, so I usually use asserters available in the Behatch\Asserter trait to simplify my context code.
Today I wanted to assert that a value is null, so I do this:
$this->assertEquals(null, $user->getSignature());
Php CS Fixer sees that, thinks it's a PhpUnit test, and changes it to:
$this->assertNull($user->getSignature());
But of course, then I get this error:
Fatal error: Call to undefined method App\Tests\Behat\Context\UserContext::assertNull()
I have a Behat context that extends
Behatch\Context\BaseContext
, so I usually use asserters available in theBehatch\Asserter
trait to simplify my context code.Today I wanted to assert that a value is null, so I do this:
Php CS Fixer sees that, thinks it's a PhpUnit test, and changes it to:
But of course, then I get this error:
So I propose to add this useful method.