2016-03-15 73 views
0

我在\测试验证码\单位\ ReportTest.phpCodeception:使用REST模块测试

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->canSeeResponseCodeIs()是不确定的,我有点新上用Codeception我小伙子,所以承受,

这里是我的unit.suite.yml

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

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

回答

0

使用REST模块比使用TEST更好使用CEST。