PHP Class ZendTest\Stratigility\MiddlewarePipeTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: zendframework/zend-stratigility

Méthodes publiques

Свойство Type Description
$deprecationsSuppressed
$errorHandler

Méthodes publiques

Méthode Description
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 ( )

Method Details

createFinalHandler() public méthode

public createFinalHandler ( ) : NoopFinalHandler
Résultat Zend\Stratigility\NoopFinalHandler

errorMiddleware() public méthode

public errorMiddleware ( )

invalidHandlers() public méthode

public invalidHandlers ( )

nestedPaths() public méthode

public nestedPaths ( )

restoreErrorHandler() public méthode

public restoreErrorHandler ( )

rootPaths() public méthode

public rootPaths ( )

sampleMiddleware() public méthode

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
Résultat Psr\Http\Message\ResponseInterface

setUp() public méthode

public setUp ( )

suppressDeprecationNotice() public méthode

tearDown() public méthode

public tearDown ( )

testCanComposeResponsePrototype() public méthode

testCanEnableRaiseThrowablesFlag() public méthode

testCanPipeInteropMiddleware() public méthode

testCanUseDecoratedRequestAndResponseDirectly() public méthode

testEnablingRaiseThrowablesCausesInvocationToThrowExceptions() public méthode

testEnablingRaiseThrowablesCausesProcessToThrowExceptions() public méthode

testHandleInvokesFirstErrorHandlerOnErrorInChain() public méthode

testHandleInvokesOutHandlerIfQueueIsExhausted() public méthode

testHandleInvokesUntilFirstHandlerThatDoesNotCallNext() public méthode

testMiddlewareRequestPathMustBeTrimmedOffWithPipeRoutePath() public méthode

testMiddlewareTreatsBothSlashAndEmptyPathAsTheRootPath() public méthode

testNestedMiddlewareMatchesOnlyAtPathBoundaries() public méthode

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

testNestedMiddlewareMayInvokeDoneToInvokeNextOfParent() public méthode

testNoResponsePrototypeComposeByDefault() public méthode

testOmittingFinalHandlerDuringInvocationRaisesDeprecationNotice() public méthode

testPassesOriginalResponseToFinalHandler() public méthode

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() public méthode

testRaiseThrowablesFlagIsFalseByDefault() public méthode

testReturnsOrigionalResponseIfQueueDoesNotReturnAResponseAndNoFinalHandlerRegistered() public méthode

testReturnsResponseReturnedByQueue() public méthode

testSlashShouldBeAppendedInChildMiddlewareWhenRequestUriIncludesIt() public méthode

testSlashShouldNotBeAppendedInChildMiddlewareWhenLayerDoesNotIncludeIt() public méthode

testWillDecorateACallableDefiningADelegateArgumentUsingAlternateDecorator() public méthode

testWillDecorateCallableArrayMiddlewareWithoutErrors() public méthode

testWillDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypePresent() public méthode

testWillNotDecorateCallableErrorMiddlewareDuringPipingEvenWithResponsePrototypePresent() public méthode

testWillNotDecorateCallableMiddlewareAsInteropMiddlewareIfResponsePrototypeIsNotPresent() public méthode

Property Details

$deprecationsSuppressed public_oe property

public $deprecationsSuppressed

$errorHandler public_oe property

public $errorHandler