我正在使用 Codeception 对我的 Laravel 4 PHP 应用程序进行单元、功能和验收测试。
我的单元测试如下所示:
use Codeception\Util\Stub;
class ExampleTest extends \Codeception\TestCase\Test
{
public function testExample()
{
$example = true;
$this->assertSame($example, true);
}
}
我的功能测试如下所示:
use \TestGuy;
class ExampleCest
{
public function example(TestGuy $I)
{
$I->amOnPage('/auth/login');
$I->see('Sign in');
}
}
但我也想在我的功能测试中使用 PHPUnit 断言方法。但是当我尝试时,我得到了这个错误:
调用未定义的方法 ExampleCest::assertSame()
如何在 Codeception 功能测试中使用 PHP 断言方法?