Kraken\_Unit\Promise\Helper\CancellationQueueTest::testApiInvoke_ThrowsExceptionsFromCancel PHP Метод

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

    public function testApiInvoke_ThrowsExceptionsFromCancel()
    {
        $this->setExpectedException(Exception::class, 'test');
        $mock = $this->getMock(PromiseInterface::class);
        $mock->expects($this->once())->method('cancel')->will($this->throwException(new Exception('test')));
        $cancellationQueue = new CancellationQueue();
        $cancellationQueue->enqueue($mock);
        $cancellationQueue();
    }