Drupal 8  8.0.2
FormAjaxSubscriberTest Class Reference
Inheritance diagram for FormAjaxSubscriberTest:

Public Member Functions

 testOnException ()
 
 testOnExceptionNewBuildId ()
 
 testOnExceptionOtherClass ()
 
 testOnExceptionResponseBuilderException ()
 
 testOnExceptionBrokenPostRequest ()
 
 testOnExceptionNestedException ()
 
 testOnExceptionNestedWrongException ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 assertResponseFromException (Request $request,\Exception $exception, $expected_response)
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $subscriber
 
 $formAjaxResponseBuilder
 
 $httpKernel
 
 $stringTranslation
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

EventSubscriber

Member Function Documentation

assertResponseFromException ( Request  $request,
\Exception  $exception,
  $expected_response 
)
protected

Asserts that the expected response is derived from the given exception.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe request.
\Exception$exceptionThe exception to pass to the event.
\Symfony\Component\HttpFoundation\Response | null$expected_responseThe response expected to be set on the event.
Returns
The event used to derive the response.

Referenced by FormAjaxSubscriberTest\testOnException(), FormAjaxSubscriberTest\testOnExceptionNestedException(), FormAjaxSubscriberTest\testOnExceptionNestedWrongException(), FormAjaxSubscriberTest\testOnExceptionNewBuildId(), FormAjaxSubscriberTest\testOnExceptionOtherClass(), and FormAjaxSubscriberTest\testOnExceptionResponseBuilderException().

Here is the caller graph for this function:

setUp ( )
protected

{}

References UnitTestCase\getStringTranslationStub().

Here is the call graph for this function:

testOnException ( )

::onException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:

testOnExceptionBrokenPostRequest ( )

::onException

References FormBuilderInterface\AJAX_FORM_REQUEST, UnitTestCase\getStringTranslationStub(), and Drupal\setContainer().

Here is the call graph for this function:

testOnExceptionNestedException ( )

::onException ::getFormAjaxException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:

testOnExceptionNestedWrongException ( )

::getFormAjaxException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:

testOnExceptionNewBuildId ( )

::onException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:

testOnExceptionOtherClass ( )

::onException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:

testOnExceptionResponseBuilderException ( )

::onException

References FormAjaxSubscriberTest\assertResponseFromException().

Here is the call graph for this function:


The documentation for this class was generated from the following file: