ZendTest\Stratigility\MiddlewarePipeTest::testWillNotDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypeIsNotPresent PHP Метод

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

    public function testWillNotDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypeIsNotPresent()
    {
        $pipeline = new MiddlewarePipe();
        $middleware = function () {
        };
        $pipeline->pipe($middleware);
        $r = new ReflectionProperty($pipeline, 'pipeline');
        $r->setAccessible(true);
        $queue = $r->getValue($pipeline);
        $route = $queue->dequeue();
        $test = $route->handler;
        $this->assertNotInstanceOf(CallableMiddlewareWrapper::class, $test);
        $this->assertInternalType('callable', $test);
    }
MiddlewarePipeTest