Kraken\_Unit\Channel\Record\RequestTest::testApiCancel_InvokesOnAbortHandler PHP Method

testApiCancel_InvokesOnAbortHandler() public method

    public function testApiCancel_InvokesOnAbortHandler()
    {
        $expected = new Exception();
        $result = new StdClass();
        $callable = $this->createCallableMock();
        $callable->expects($this->once())->method('__invoke')->with($expected)->will($this->returnValue($result));
        $req = $this->createRequest('pid', null, null, $callable);
        $this->assertSame($result, $req->cancel($expected));
    }