Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing Codeception:在测试中使用REST模块_Unit Testing_Laravel 5.1_Codeception - Fatal编程技术网

Unit testing Codeception:在测试中使用REST模块

Unit testing Codeception:在测试中使用REST模块,unit-testing,laravel-5.1,codeception,Unit Testing,Laravel 5.1,Codeception,我在\tests\unit\ReportTest.php中有这段代码: class ReportTest extends \Codeception\TestCase\Test { protected function _before() { Auth::attempt(['email' => $this->valid_email, 'password' => $this->valid_password]); } prot

我在\tests\unit\ReportTest.php中有这段代码:

class ReportTest extends \Codeception\TestCase\Test
{

    protected function _before()
    {
        Auth::attempt(['email' => $this->valid_email, 'password' => $this->valid_password]);
    }

    protected function _after()
    {
    }

    public function testMe()
    {
        $this->sendGet(route('index'));
        $this->canSeeResponseCodeIs(200);
    }
}
我的问题是方法
$this->sendGet()
$this->canseesresponsecodeis()
没有定义,我对使用Codeception有点陌生,所以请大家耐心听我说

这是我的
unit.suite.yml

class_name: UnitTester
modules:
    enabled:
        - Asserts
        - \Helper\Unit
        - Laravel5
        - REST:
            depends: PhpBrowser
    config:
      Laravel5:
        environment_file: .env

我想使用REST模块,但我无法让它工作。

使用REST模块时使用CEST似乎比使用TEST更好