PHP Класс ZendTest\Stratigility\MiddlewarePipeTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$deprecationsSuppressed
$errorHandler

Открытые методы

Метод Описание
createFinalHandler ( ) : NoopFinalHandler
errorMiddleware ( )
invalidHandlers ( )
nestedPaths ( )
restoreErrorHandler ( )
rootPaths ( )
sampleMiddleware ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Used to test that array callables are decorated correctly.
setUp ( )
suppressDeprecationNotice ( )
tearDown ( )
testCanComposeResponsePrototype ( )
testCanEnableRaiseThrowablesFlag ( )
testCanPipeInteropMiddleware ( )
testCanUseDecoratedRequestAndResponseDirectly ( )
testEnablingRaiseThrowablesCausesInvocationToThrowExceptions ( )
testEnablingRaiseThrowablesCausesProcessToThrowExceptions ( )
testHandleInvokesFirstErrorHandlerOnErrorInChain ( )
testHandleInvokesOutHandlerIfQueueIsExhausted ( )
testHandleInvokesUntilFirstHandlerThatDoesNotCallNext ( )
testMiddlewareRequestPathMustBeTrimmedOffWithPipeRoutePath ( )
testMiddlewareTreatsBothSlashAndEmptyPathAsTheRootPath ( $path )
testNestedMiddlewareMatchesOnlyAtPathBoundaries ( $topPath, $nestedPath, $fullPath, $assertion )
testNestedMiddlewareMayInvokeDoneToInvokeNextOfParent ( )
testNoResponsePrototypeComposeByDefault ( )
testOmittingFinalHandlerDuringInvocationRaisesDeprecationNotice ( )
testPassesOriginalResponseToFinalHandler ( ) Test that FinalHandler is passed the original response.
testPipeThrowsExceptionForInvalidHandler ( $handler )
testRaiseThrowablesFlagIsFalseByDefault ( )
testReturnsOrigionalResponseIfQueueDoesNotReturnAResponseAndNoFinalHandlerRegistered ( )
testReturnsResponseReturnedByQueue ( )
testSlashShouldBeAppendedInChildMiddlewareWhenRequestUriIncludesIt ( )
testSlashShouldNotBeAppendedInChildMiddlewareWhenLayerDoesNotIncludeIt ( )
testWillDecorateACallableDefiningADelegateArgumentUsingAlternateDecorator ( )
testWillDecorateCallableArrayMiddlewareWithoutErrors ( )
testWillDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypePresent ( )
testWillNotDecorateCallableErrorMiddlewareDuringPipingEvenWithResponsePrototypePresent ( $middleware )
testWillNotDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypeIsNotPresent ( )

Описание методов

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

public createFinalHandler ( ) : NoopFinalHandler
Результат Zend\Stratigility\NoopFinalHandler

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

public errorMiddleware ( )

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

public invalidHandlers ( )

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

public nestedPaths ( )

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

public restoreErrorHandler ( )

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

public rootPaths ( )

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

Used to test that array callables are decorated correctly.
public sampleMiddleware ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
Результат Psr\Http\Message\ResponseInterface

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

public setUp ( )

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

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

public tearDown ( )

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

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

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

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

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

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

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

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

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

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

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

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

public testNestedMiddlewareMatchesOnlyAtPathBoundaries ( $topPath, $nestedPath, $fullPath, $assertion )

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

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

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

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

Tests that MiddlewarePipe passes the original response passed to it when creating the FinalHandler instance, and that FinalHandler compares the response passed to it on invocation to its original response. If the two differ, the response passed during invocation should be returned unmodified; this is an indication that a middleware has provided a response, and is simply passing further up the chain to allow further processing (e.g., to allow an application-wide logger at the end of the request).

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

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

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

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

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

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

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

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

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

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

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

Описание свойств

$deprecationsSuppressed публичное свойство

public $deprecationsSuppressed

$errorHandler публичное свойство

public $errorHandler