Crud\TestCase\Action\BaseActionTest::testHandleException PHP Метод

testHandleException() публичный Метод

Test that calling handle will not invoke _handle when the action is disabled
public testHandleException ( ) : void
Результат void
    public function testHandleException()
    {
        $Action = $this->getMockBuilder('Crud\\Action\\BaseAction')->setMethods(['_request', 'config'])->setConstructorArgs([$this->Controller])->getMock();
        $Request = $this->getMockBuilder('Cake\\Network\\Request')->setMethods(['method'])->getMock();
        $Request->expects($this->once())->method('method')->will($this->returnValue('GET'));
        $i = 0;
        $Action->expects($this->at($i++))->method('config')->with('enabled')->will($this->returnValue(true));
        $Action->expects($this->at($i++))->method('_request')->will($this->returnValue($Request));
        $Action->handle();
    }