我正在使用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断言方法?
\PHPUnit_Framework_Assert::assertSame()