ZendTest\Stratigility\NextTest::testDoneHandlerIsInvokedWhenQueueIsExhaustedByProcessAndResponsePrototypeIsPresent PHP Method

testDoneHandlerIsInvokedWhenQueueIsExhaustedByProcessAndResponsePrototypeIsPresent() public method

    public function testDoneHandlerIsInvokedWhenQueueIsExhaustedByProcessAndResponsePrototypeIsPresent()
    {
        $response = $this->prophesize(ResponseInterface::class)->reveal();
        // e.g., 0 length array, or all handlers call next
        $done = function ($req, $res, $err = null) use($response) {
            Assert::assertSame($response, $res);
            return $response;
        };
        $next = new Next($this->queue, $done);
        $next->setResponsePrototype($response);
        $this->assertSame($response, $next->process($this->request));
    }
NextTest