Drupal 8  8.0.2
ViewAjaxControllerTest Class Reference
Inheritance diagram for ViewAjaxControllerTest:

Public Member Functions

 testMissingViewName ()
 
 testMissingView ()
 
 testAccessDeniedView ()
 
 testAjaxView ()
 
 testAjaxViewWithArguments ()
 
 testAjaxViewWithEmptyArguments ()
 
 testAjaxViewWithPager ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Protected Member Functions

 setUp ()
 
 setupValidMocks ()
 
 getCommands (ViewAjaxResponse $response)
 
 assertViewResultCommand (ViewAjaxResponse $response, $position=0)
 
- 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

 $viewStorage
 
 $executableFactory
 
 $viewAjaxController
 
 $currentPath
 
 $redirectDestination
 
 $renderer
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

views

Member Function Documentation

assertViewResultCommand ( ViewAjaxResponse  $response,
  $position = 0 
)
protected

Ensures that the main view content command is added.

Parameters
\Drupal\views\Ajax\ViewAjaxResponse$responseThe response object.
int$positionThe position where the view content command is expected.

References ViewAjaxControllerTest\getCommands().

Referenced by ViewAjaxControllerTest\testAjaxView(), ViewAjaxControllerTest\testAjaxViewWithArguments(), ViewAjaxControllerTest\testAjaxViewWithEmptyArguments(), and ViewAjaxControllerTest\testAjaxViewWithPager().

Here is the call graph for this function:

Here is the caller graph for this function:

getCommands ( ViewAjaxResponse  $response)
protected

Gets the commands entry from the response object.

Parameters
\Drupal\views\Ajax\ViewAjaxResponse$responseThe views ajax response object.
Returns
mixed Returns the commands.

Referenced by ViewAjaxControllerTest\assertViewResultCommand(), and ViewAjaxControllerTest\testAjaxViewWithPager().

Here is the caller graph for this function:

setUp ( )
protected

{}

References Drupal\setContainer().

Here is the call graph for this function:

setupValidMocks ( )
protected

Sets up a bunch of valid mocks like the view entity and executable.

Referenced by ViewAjaxControllerTest\testAjaxView(), ViewAjaxControllerTest\testAjaxViewWithArguments(), ViewAjaxControllerTest\testAjaxViewWithEmptyArguments(), and ViewAjaxControllerTest\testAjaxViewWithPager().

Here is the caller graph for this function:

testAccessDeniedView ( )

Tests a view without having access to it.

testAjaxView ( )

Tests a valid view without arguments pagers etc.

References ViewAjaxControllerTest\assertViewResultCommand(), and ViewAjaxControllerTest\setupValidMocks().

Here is the call graph for this function:

testAjaxViewWithArguments ( )

Tests a valid view with arguments.

References ViewAjaxControllerTest\assertViewResultCommand(), and ViewAjaxControllerTest\setupValidMocks().

Here is the call graph for this function:

testAjaxViewWithEmptyArguments ( )

Tests a valid view with arguments.

References ViewAjaxControllerTest\assertViewResultCommand(), and ViewAjaxControllerTest\setupValidMocks().

Here is the call graph for this function:

testAjaxViewWithPager ( )

Tests a valid view with a pager.

References ViewAjaxControllerTest\assertViewResultCommand(), ViewAjaxControllerTest\getCommands(), UnitTestCase\randomMachineName(), and ViewAjaxControllerTest\setupValidMocks().

Here is the call graph for this function:

testMissingView ( )

Tests with view_name and view_display_id but not existing view.

testMissingViewName ( )

Tests missing view_name and view_display_id


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