TYPO3 CMS  TYPO3_8-7
ActionControllerTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
26 
30 class ActionControllerTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
31 {
35  protected $actionController;
36 
40  protected $mockObjectManager;
41 
45  protected $mockUriBuilder;
46 
51 
52  protected function setUp()
53  {
54  $this->actionController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class);
55  }
56 
60  public function processRequestSticksToSpecifiedSequence()
61  {
62  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
63  $mockRequest->expects($this->once())->method('setDispatched')->with(true);
64  $mockUriBuilder = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
65  $mockUriBuilder->expects($this->once())->method('setRequest')->with($mockRequest);
66  $mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
67  $mockObjectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class)->will($this->returnValue($mockUriBuilder));
68  $mockResponse = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Response::class);
69  $configurationService = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class);
71  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, [
72  'initializeFooAction',
73  'initializeAction',
74  'resolveActionMethodName',
75  'initializeActionMethodArguments',
76  'initializeActionMethodValidators',
77  'mapRequestArgumentsToControllerArguments',
78  'buildControllerContext',
79  'resolveView',
80  'initializeView',
81  'callActionMethod',
82  'checkRequestHash'
83  ], [], '', false);
84  $mockController->_set('objectManager', $mockObjectManager);
85 
86  $mockController->expects($this->at(0))->method('resolveActionMethodName')->will($this->returnValue('fooAction'));
87  $mockController->expects($this->at(1))->method('initializeActionMethodArguments');
88  $mockController->expects($this->at(2))->method('initializeActionMethodValidators');
89  $mockController->expects($this->at(3))->method('initializeAction');
90  $mockController->expects($this->at(4))->method('initializeFooAction');
91  $mockController->expects($this->at(5))->method('mapRequestArgumentsToControllerArguments');
92  $mockController->expects($this->at(6))->method('checkRequestHash');
93  $mockController->expects($this->at(7))->method('buildControllerContext');
94  $mockController->expects($this->at(8))->method('resolveView');
95 
96  $mockController->_set('mvcPropertyMappingConfigurationService', $configurationService);
97  $mockController->_set('arguments', new \TYPO3\CMS\Extbase\Mvc\Controller\Arguments());
98 
99  $mockController->processRequest($mockRequest, $mockResponse);
100  $this->assertSame($mockRequest, $mockController->_get('request'));
101  $this->assertSame($mockResponse, $mockController->_get('response'));
102  }
103 
108  {
109  $mockControllerContext = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class);
110  $mockFluidTemplateView = $this->createMock(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class);
111  $mockFluidTemplateView->expects($this->once())->method('setControllerContext')->with($mockControllerContext);
112  $mockFluidTemplateView->expects($this->once())->method('canRender')->with($mockControllerContext)->will($this->returnValue(true));
113  $mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
114  $mockObjectManager->expects($this->at(0))->method('get')->with(\TYPO3\CMS\Fluid\View\TemplateView::class)->will($this->returnValue($mockFluidTemplateView));
115  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['buildControllerContext', 'resolveViewObjectName', 'setViewConfiguration'], [], '', false);
116  $mockController->expects($this->once())->method('resolveViewObjectName')->will($this->returnValue(false));
117  $mockController->_set('objectManager', $mockObjectManager);
118  $mockController->_set('controllerContext', $mockControllerContext);
119  $this->assertSame($mockFluidTemplateView, $mockController->_call('resolveView'));
120  }
121 
126  {
127  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
128  $mockRequest->expects($this->once())->method('getControllerVendorName')->will($this->returnValue('MyVendor'));
129  $mockRequest->expects($this->once())->method('getControllerExtensionName')->will($this->returnValue('MyPackage'));
130  $mockRequest->expects($this->once())->method('getControllerName')->will($this->returnValue('MyController'));
131  $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('MyAction'));
132  $mockRequest->expects($this->atLeastOnce())->method('getFormat')->will($this->returnValue('MyFormat'));
133  $mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
134  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['dummy'], [], '', false);
135  $mockController->_set('request', $mockRequest);
136  $mockController->_set('objectManager', $mockObjectManager);
137  $mockController->_set('namespacesViewObjectNamePattern', 'RandomViewObject@vendor\@extension\View\@controller\@action@format');
138  $mockController->_call('resolveViewObjectName');
139  }
140 
145  {
146  eval('namespace MyVendor\MyPackage\View\MyController; class MyActionMyFormat {}');
147 
148  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
149  $mockRequest->expects($this->once())->method('getControllerExtensionName')->will($this->returnValue('MyPackage'));
150  $mockRequest->expects($this->once())->method('getControllerName')->will($this->returnValue('MyController'));
151  $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('MyAction'));
152  $mockRequest->expects($this->once())->method('getControllerVendorName')->will($this->returnValue('MyVendor'));
153  $mockRequest->expects($this->atLeastOnce())->method('getFormat')->will($this->returnValue('MyFormat'));
154  $mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
155  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['dummy'], [], '', false);
156  $mockController->_set('request', $mockRequest);
157  $mockController->_set('objectManager', $mockObjectManager);
158 
159  $this->assertEquals(
160  'MyVendor\MyPackage\View\MyController\MyActionMyFormat',
161  $mockController->_call('resolveViewObjectName')
162  );
163  }
164 
168  public function resolveActionMethodNameReturnsTheCurrentActionMethodNameFromTheRequest()
169  {
170  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
171  $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('fooBar'));
173  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['fooBarAction'], [], '', false);
174  $mockController->_set('request', $mockRequest);
175  $this->assertEquals('fooBarAction', $mockController->_call('resolveActionMethodName'));
176  }
177 
181  public function resolveActionMethodNameThrowsAnExceptionIfTheActionDefinedInTheRequestDoesNotExist()
182  {
183  $this->expectException(NoSuchActionException::class);
184  $this->expectExceptionCode(1186669086);
185  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
186  $mockRequest->expects($this->once())->method('getControllerActionName')->will($this->returnValue('fooBar'));
188  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['otherBarAction'], [], '', false);
189  $mockController->_set('request', $mockRequest);
190  $mockController->_call('resolveActionMethodName');
191  }
192 
197  {
198  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
199  $mockArguments = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class)
200  ->setMethods(['addNewArgument', 'removeAll'])
201  ->getMock();
202  $mockArguments->expects($this->at(0))->method('addNewArgument')->with('stringArgument', 'string', true);
203  $mockArguments->expects($this->at(1))->method('addNewArgument')->with('integerArgument', 'integer', true);
204  $mockArguments->expects($this->at(2))->method('addNewArgument')->with('objectArgument', 'F3_Foo_Bar', true);
205  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['fooAction', 'evaluateDontValidateAnnotations'], [], '', false);
206  $methodParameters = [
207  'stringArgument' => [
208  'position' => 0,
209  'byReference' => false,
210  'array' => false,
211  'optional' => false,
212  'allowsNull' => false,
213  'type' => 'string'
214  ],
215  'integerArgument' => [
216  'position' => 1,
217  'byReference' => false,
218  'array' => false,
219  'optional' => false,
220  'allowsNull' => false,
221  'type' => 'integer'
222  ],
223  'objectArgument' => [
224  'position' => 2,
225  'byReference' => false,
226  'array' => false,
227  'optional' => false,
228  'allowsNull' => false,
229  'type' => 'F3_Foo_Bar'
230  ]
231  ];
232  $mockReflectionService = $this->createMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
233  $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
234  $mockController->_set('reflectionService', $mockReflectionService);
235  $mockController->_set('request', $mockRequest);
236  $mockController->_set('arguments', $mockArguments);
237  $mockController->_set('actionMethodName', 'fooAction');
238  $mockController->_call('initializeActionMethodArguments');
239  }
240 
245  {
246  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
247  $mockArguments = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class);
248  $mockArguments->expects($this->at(0))->method('addNewArgument')->with('arg1', 'string', true);
249  $mockArguments->expects($this->at(1))->method('addNewArgument')->with('arg2', 'array', false, [21]);
250  $mockArguments->expects($this->at(2))->method('addNewArgument')->with('arg3', 'string', false, 42);
251  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['fooAction', 'evaluateDontValidateAnnotations'], [], '', false);
252  $methodParameters = [
253  'arg1' => [
254  'position' => 0,
255  'byReference' => false,
256  'array' => false,
257  'optional' => false,
258  'allowsNull' => false,
259  'type' => 'string'
260  ],
261  'arg2' => [
262  'position' => 1,
263  'byReference' => false,
264  'array' => true,
265  'optional' => true,
266  'defaultValue' => [21],
267  'allowsNull' => false
268  ],
269  'arg3' => [
270  'position' => 2,
271  'byReference' => false,
272  'array' => false,
273  'optional' => true,
274  'defaultValue' => 42,
275  'allowsNull' => false,
276  'type' => 'string'
277  ]
278  ];
279  $mockReflectionService = $this->createMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
280  $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
281  $mockController->_set('reflectionService', $mockReflectionService);
282  $mockController->_set('request', $mockRequest);
283  $mockController->_set('arguments', $mockArguments);
284  $mockController->_set('actionMethodName', 'fooAction');
285  $mockController->_call('initializeActionMethodArguments');
286  }
287 
292  {
293  $this->expectException(InvalidArgumentTypeException::class);
294  $this->expectExceptionCode(1253175643);
295  $mockRequest = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class);
296  $mockArguments = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\Arguments::class);
297  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['fooAction'], [], '', false);
298  $methodParameters = [
299  'arg1' => [
300  'position' => 0,
301  'byReference' => false,
302  'array' => false,
303  'optional' => false,
304  'allowsNull' => false
305  ]
306  ];
307  $mockReflectionService = $this->createMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
308  $mockReflectionService->expects($this->once())->method('getMethodParameters')->with(get_class($mockController), 'fooAction')->will($this->returnValue($methodParameters));
309  $mockController->_set('reflectionService', $mockReflectionService);
310  $mockController->_set('request', $mockRequest);
311  $mockController->_set('arguments', $mockArguments);
312  $mockController->_set('actionMethodName', 'fooAction');
313  $mockController->_call('initializeActionMethodArguments');
314  }
315 
322  public function setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath($configuration, $expected)
323  {
325  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['dummy'], [], '', false);
327  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
328  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
329  $mockController->injectConfigurationManager($mockConfigurationManager);
330  $mockController->_set('request', $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class), ['getControllerExtensionKey']);
331  $view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)
332  ->setMethods(['setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setTemplateRootPaths'])
333  ->getMock();
334  $view->expects($this->once())->method('setTemplateRootPaths')->with($expected);
335  $mockController->_call('setViewConfiguration', $view);
336  }
337 
342  {
343  return [
344  'text keys' => [
345  [
346  'view' => [
347  'templateRootPaths' => [
348  'default' => 'some path',
349  'extended' => 'some other path'
350  ]
351  ]
352  ],
353  [
354  'extended' => 'some other path',
355  'default' => 'some path'
356  ]
357  ],
358  'numerical keys' => [
359  [
360  'view' => [
361  'templateRootPaths' => [
362  '10' => 'some path',
363  '20' => 'some other path',
364  '15' => 'intermediate specific path'
365  ]
366  ]
367  ],
368  [
369  '20' => 'some other path',
370  '15' => 'intermediate specific path',
371  '10' => 'some path'
372  ]
373  ],
374  'mixed keys' => [
375  [
376  'view' => [
377  'templateRootPaths' => [
378  '10' => 'some path',
379  'very_specific' => 'some other path',
380  '15' => 'intermediate specific path'
381  ]
382  ]
383  ],
384  [
385  '15' => 'intermediate specific path',
386  'very_specific' => 'some other path',
387  '10' => 'some path'
388  ]
389  ],
390  ];
391  }
392 
400  public function setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath($configuration, $expected)
401  {
403  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['dummy'], [], '', false);
405  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
406  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
407  $mockController->injectConfigurationManager($mockConfigurationManager);
408  $mockController->_set('request', $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class), ['getControllerExtensionKey']);
409  $view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)
410  ->setMethods(['setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setlayoutRootPaths'])
411  ->getMock();
412  $view->expects($this->once())->method('setlayoutRootPaths')->with($expected);
413  $mockController->_call('setViewConfiguration', $view);
414  }
415 
419  public function layoutRootPathDataProvider()
420  {
421  return [
422  'text keys' => [
423  [
424  'view' => [
425  'layoutRootPaths' => [
426  'default' => 'some path',
427  'extended' => 'some other path'
428  ]
429  ]
430  ],
431  [
432  'extended' => 'some other path',
433  'default' => 'some path'
434  ]
435  ],
436  'numerical keys' => [
437  [
438  'view' => [
439  'layoutRootPaths' => [
440  '10' => 'some path',
441  '20' => 'some other path',
442  '15' => 'intermediate specific path'
443  ]
444  ]
445  ],
446  [
447  '20' => 'some other path',
448  '15' => 'intermediate specific path',
449  '10' => 'some path'
450  ]
451  ],
452  'mixed keys' => [
453  [
454  'view' => [
455  'layoutRootPaths' => [
456  '10' => 'some path',
457  'very_specific' => 'some other path',
458  '15' => 'intermediate specific path'
459  ]
460  ]
461  ],
462  [
463  '15' => 'intermediate specific path',
464  'very_specific' => 'some other path',
465  '10' => 'some path'
466  ]
467  ],
468  ];
469  }
470 
478  public function setViewConfigurationResolvesPartialRootPathsForPartialRootPath($configuration, $expected)
479  {
481  $mockController = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\ActionController::class, ['dummy'], [], '', false);
483  $mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
484  $mockConfigurationManager->expects($this->any())->method('getConfiguration')->will($this->returnValue($configuration));
485  $mockController->injectConfigurationManager($mockConfigurationManager);
486  $mockController->_set('request', $this->createMock(\TYPO3\CMS\Extbase\Mvc\Request::class), ['getControllerExtensionKey']);
487  $view = $this->getMockBuilder(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface::class)
488  ->setMethods(['setControllerContext', 'assign', 'assignMultiple', 'canRender', 'render', 'initializeView', 'setpartialRootPaths'])
489  ->getMock();
490  $view->expects($this->once())->method('setpartialRootPaths')->with($expected);
491  $mockController->_call('setViewConfiguration', $view);
492  }
493 
497  public function partialRootPathDataProvider()
498  {
499  return [
500  'text keys' => [
501  [
502  'view' => [
503  'partialRootPaths' => [
504  'default' => 'some path',
505  'extended' => 'some other path'
506  ]
507  ]
508  ],
509  [
510  'extended' => 'some other path',
511  'default' => 'some path'
512  ]
513  ],
514  'numerical keys' => [
515  [
516  'view' => [
517  'partialRootPaths' => [
518  '10' => 'some path',
519  '20' => 'some other path',
520  '15' => 'intermediate specific path'
521  ]
522  ]
523  ],
524  [
525  '20' => 'some other path',
526  '15' => 'intermediate specific path',
527  '10' => 'some path'
528  ]
529  ],
530  'mixed keys' => [
531  [
532  'view' => [
533  'partialRootPaths' => [
534  '10' => 'some path',
535  'very_specific' => 'some other path',
536  '15' => 'intermediate specific path'
537  ]
538  ]
539  ],
540  [
541  '15' => 'intermediate specific path',
542  'very_specific' => 'some other path',
543  '10' => 'some path'
544  ]
545  ],
546  ];
547  }
548 
556  public function rendersAndAssignsAssetsFromViewIntoPageRenderer($viewMock, $expectedHeader, $expectedFooter)
557  {
558  $this->mockObjectManager = $this->getMockBuilder(ObjectManager::class)->setMethods(['get'])->getMock();
559  $pageRendererMock = $this->getMockBuilder(PageRenderer::class)->setMethods(['addHeaderData', 'addFooterData'])->getMock();
560  if (!$viewMock instanceof TemplateView) {
561  $this->mockObjectManager->expects($this->never())->method('get');
562  } else {
563  $this->mockObjectManager->expects($this->any())->method('get')->with(PageRenderer::class)->willReturn($pageRendererMock);
564  }
565  if (!empty(trim($expectedHeader))) {
566  $pageRendererMock->expects($this->once())->method('addHeaderData')->with($expectedHeader);
567  } else {
568  $pageRendererMock->expects($this->never())->method('addHeaderData');
569  }
570  if (!empty(trim($expectedFooter))) {
571  $pageRendererMock->expects($this->once())->method('addFooterData')->with($expectedFooter);
572  } else {
573  $pageRendererMock->expects($this->never())->method('addFooterData');
574  }
575  $requestMock = $this->getMockBuilder(RequestInterface::class)->getMockForAbstractClass();
576  $subject = new ActionController();
577  $viewProperty = new \ReflectionProperty($subject, 'view');
578  $viewProperty->setAccessible(true);
579  $viewProperty->setValue($subject, $viewMock);
580  $objectManagerProperty = new \ReflectionProperty($subject, 'objectManager');
581  $objectManagerProperty->setAccessible(true);
582  $objectManagerProperty->setValue($subject, $this->mockObjectManager);
583 
584  $method = new \ReflectionMethod($subject, 'renderAssetsForRequest');
585  $method->setAccessible(true);
586  $method->invokeArgs($subject, [$requestMock]);
587  }
588 
592  public function headerAssetDataProvider()
593  {
594  $viewWithHeaderData = $this->getMockBuilder(TemplateView::class)->setMethods(['renderSection'])->disableOriginalConstructor()->getMock();
595  $viewWithHeaderData->expects($this->at(0))->method('renderSection')->with('HeaderAssets', $this->anything(), true)->willReturn('custom-header-data');
596  $viewWithHeaderData->expects($this->at(1))->method('renderSection')->with('FooterAssets', $this->anything(), true)->willReturn(null);
597  $viewWithFooterData = $this->getMockBuilder(TemplateView::class)->setMethods(['renderSection'])->disableOriginalConstructor()->getMock();
598  $viewWithFooterData->expects($this->at(0))->method('renderSection')->with('HeaderAssets', $this->anything(), true)->willReturn(null);
599  $viewWithFooterData->expects($this->at(1))->method('renderSection')->with('FooterAssets', $this->anything(), true)->willReturn('custom-footer-data');
600  $viewWithBothData = $this->getMockBuilder(TemplateView::class)->setMethods(['renderSection'])->disableOriginalConstructor()->getMock();
601  $viewWithBothData->expects($this->at(0))->method('renderSection')->with('HeaderAssets', $this->anything(), true)->willReturn('custom-header-data');
602  $viewWithBothData->expects($this->at(1))->method('renderSection')->with('FooterAssets', $this->anything(), true)->willReturn('custom-footer-data');
603  $invalidView = $this->getMockBuilder(AbstractTemplateView::class)->disableOriginalConstructor()->getMockForAbstractClass();
604  return [
605  [$viewWithHeaderData, 'custom-header-data', null],
606  [$viewWithFooterData, null, 'custom-footer-data'],
607  [$viewWithBothData, 'custom-header-data', 'custom-footer-data'],
608  [$invalidView, null, null]
609  ];
610  }
611 }
rendersAndAssignsAssetsFromViewIntoPageRenderer($viewMock, $expectedHeader, $expectedFooter)