‪TYPO3CMS  11.5
ActionControllerTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use PHPUnit\Framework\MockObject\MockObject;
21 use Prophecy\Argument;
22 use Prophecy\PhpUnit\ProphecyTrait;
26 use TYPO3\CMS\Core\Page\PageRenderer;
44 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
45 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
46 use TYPO3Fluid\Fluid\View\AbstractView;
47 use TYPO3Fluid\Fluid\View\TemplateView as FluidTemplateView;
48 
49 class ‪ActionControllerTest extends UnitTestCase
50 {
51  use ProphecyTrait;
52 
56  protected ‪$resetSingletonInstances = true;
57 
62 
66 
71  {
72  $mockRequest = $this->createMock(Request::class);
73  $mockRequest->expects(self::once())->method('getControllerActionName')->willReturn('fooBar');
74  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['fooBarAction']);
75  $mockController->_set('request', $mockRequest);
76  self::assertEquals('fooBarAction', $mockController->_call('resolveActionMethodName'));
77  }
78 
83  {
84  $this->expectException(NoSuchActionException::class);
85  $this->expectExceptionCode(1186669086);
86  $mockRequest = $this->createMock(Request::class);
87  $mockRequest->expects(self::once())->method('getControllerActionName')->willReturn('fooBar');
88  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['otherBarAction']);
89  $mockController->_set('request', $mockRequest);
90  $mockController->_call('resolveActionMethodName');
91  }
92 
99  {
100  $mockRequest = $this->createMock(Request::class);
101  $mockArguments = $this->getMockBuilder(Arguments::class)
102  ->onlyMethods(['addNewArgument', 'removeAll'])
103  ->getMock();
104  $mockArguments->expects(self::exactly(3))->method('addNewArgument')
105  ->withConsecutive(
106  ['stringArgument', 'string', true],
107  ['integerArgument', 'integer', true],
108  ['objectArgument', 'F3_Foo_Bar', true]
109  );
110  $mockController = $this->getAccessibleMock(ActionController::class, ['fooAction', 'evaluateDontValidateAnnotations'], [], '', false);
111 
112  $classSchemaMethod = new Method(
113  'fooAction',
114  [
115  'params' => [
116  'stringArgument' => [
117  'position' => 0,
118  'byReference' => false,
119  'array' => false,
120  'optional' => false,
121  'allowsNull' => false,
122  'type' => 'string',
123  'hasDefaultValue' => false,
124  ],
125  'integerArgument' => [
126  'position' => 1,
127  'byReference' => false,
128  'array' => false,
129  'optional' => false,
130  'allowsNull' => false,
131  'type' => 'integer',
132  'hasDefaultValue' => false,
133  ],
134  'objectArgument' => [
135  'position' => 2,
136  'byReference' => false,
137  'array' => false,
138  'optional' => false,
139  'allowsNull' => false,
140  'type' => 'F3_Foo_Bar',
141  'hasDefaultValue' => false,
142  ],
143  ],
144  ],
145  get_class($mockController)
146  );
147 
148  $classSchemaMock = $this->createMock(ClassSchema::class);
149  $classSchemaMock
150  ->method('getMethod')
151  ->with('fooAction')
152  ->willReturn($classSchemaMethod);
153 
154  $mockReflectionService = $this->createMock(ReflectionService::class);
155  $mockReflectionService
156  ->method('getClassSchema')
157  ->with(get_class($mockController))
158  ->willReturn($classSchemaMock);
159  $mockController->_set('reflectionService', $mockReflectionService);
160  $mockController->_set('request', $mockRequest);
161  $mockController->_set('arguments', $mockArguments);
162  $mockController->_set('actionMethodName', 'fooAction');
163  $mockController->_call('initializeActionMethodArguments');
164  }
165 
170  {
171  $mockRequest = $this->createMock(Request::class);
172  $mockArguments = $this->createMock(Arguments::class);
173  $mockArguments->expects(self::exactly(3))->method('addNewArgument')
174  ->withConsecutive(
175  ['arg1', 'string', true],
176  ['arg2', 'array', false, [21]],
177  ['arg3', 'string', false, 42]
178  );
179  $mockController = $this->getAccessibleMock(ActionController::class, ['fooAction', 'evaluateDontValidateAnnotations'], [], '', false);
180 
181  $classSchemaMethod = new Method(
182  'fooAction',
183  [
184  'params' => [
185  'arg1' => [
186  'position' => 0,
187  'byReference' => false,
188  'array' => false,
189  'optional' => false,
190  'allowsNull' => false,
191  'type' => 'string',
192  'hasDefaultValue' => false,
193  ],
194  'arg2' => [
195  'position' => 1,
196  'byReference' => false,
197  'array' => true,
198  'optional' => true,
199  'defaultValue' => [21],
200  'allowsNull' => false,
201  'hasDefaultValue' => true,
202  ],
203  'arg3' => [
204  'position' => 2,
205  'byReference' => false,
206  'array' => false,
207  'optional' => true,
208  'defaultValue' => 42,
209  'allowsNull' => false,
210  'type' => 'string',
211  'hasDefaultValue' => true,
212  ],
213  ],
214  ],
215  get_class($mockController)
216  );
217 
218  $classSchemaMock = $this->createMock(ClassSchema::class);
219  $classSchemaMock
220  ->method('getMethod')
221  ->with('fooAction')
222  ->willReturn($classSchemaMethod);
223 
224  $mockReflectionService = $this->createMock(ReflectionService::class);
225  $mockReflectionService
226  ->method('getClassSchema')
227  ->with(get_class($mockController))
228  ->willReturn($classSchemaMock);
229  $mockController->_set('reflectionService', $mockReflectionService);
230  $mockController->_set('request', $mockRequest);
231  $mockController->_set('arguments', $mockArguments);
232  $mockController->_set('actionMethodName', 'fooAction');
233  $mockController->_call('initializeActionMethodArguments');
234  }
235 
240  {
241  $this->expectException(InvalidArgumentTypeException::class);
242  $this->expectExceptionCode(1253175643);
243  $mockRequest = $this->createMock(Request::class);
244  $mockArguments = $this->createMock(Arguments::class);
245  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['fooAction']);
246 
247  $classSchemaMethod = new Method(
248  'fooAction',
249  [
250  'params' => [
251  'arg1' => [
252  'position' => 0,
253  'byReference' => false,
254  'array' => false,
255  'optional' => false,
256  'allowsNull' => false,
257  ],
258  ],
259  ],
260  get_class($mockController)
261  );
262 
263  $classSchemaMock = $this->createMock(ClassSchema::class);
264  $classSchemaMock
265  ->method('getMethod')
266  ->with('fooAction')
267  ->willReturn($classSchemaMethod);
268 
269  $mockReflectionService = $this->createMock(ReflectionService::class);
270  $mockReflectionService
271  ->method('getClassSchema')
272  ->with(get_class($mockController))
273  ->willReturn($classSchemaMock);
274  $mockController->_set('reflectionService', $mockReflectionService);
275  $mockController->_set('request', $mockRequest);
276  $mockController->_set('arguments', $mockArguments);
277  $mockController->_set('actionMethodName', 'fooAction');
278  $mockController->_call('initializeActionMethodArguments');
279  }
280 
287  public function ‪setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath(array $configuration, array $expected): void
288  {
289  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']);
290  $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class);
291  $mockConfigurationManager->method('getConfiguration')->willReturn($configuration);
292  $mockController->injectConfigurationManager($mockConfigurationManager);
293  $mockController->_set('request', $this->createMock(Request::class));
294  $view = $this->getMockBuilder(ViewInterface::class)
295  // @deprecated since v11, will be removed with v12: Drop setControllerContext from list
296  ->onlyMethods(['setControllerContext', 'assign', 'assignMultiple', 'render', 'initializeView'])
297  ->addMethods(['setTemplateRootPaths'])
298  ->getMock();
299  $view->expects(self::once())->method('setTemplateRootPaths')->with($expected);
300  $mockController->_call('setViewConfiguration', $view);
301  }
302 
306  public function ‪templateRootPathDataProvider(): array
307  {
308  return [
309  'text keys' => [
310  [
311  'view' => [
312  'templateRootPaths' => [
313  'default' => 'some path',
314  'extended' => 'some other path',
315  ],
316  ],
317  ],
318  [
319  'extended' => 'some other path',
320  'default' => 'some path',
321  ],
322  ],
323  'numerical keys' => [
324  [
325  'view' => [
326  'templateRootPaths' => [
327  '10' => 'some path',
328  '20' => 'some other path',
329  '15' => 'intermediate specific path',
330  ],
331  ],
332  ],
333  [
334  '20' => 'some other path',
335  '15' => 'intermediate specific path',
336  '10' => 'some path',
337  ],
338  ],
339  'mixed keys' => [
340  [
341  'view' => [
342  'templateRootPaths' => [
343  '10' => 'some path',
344  'very_specific' => 'some other path',
345  '15' => 'intermediate specific path',
346  ],
347  ],
348  ],
349  [
350  '15' => 'intermediate specific path',
351  'very_specific' => 'some other path',
352  '10' => 'some path',
353  ],
354  ],
355  ];
356  }
357 
365  public function ‪setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath(array $configuration, array $expected): void
366  {
367  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']);
368  $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class);
369  $mockConfigurationManager->method('getConfiguration')->willReturn($configuration);
370  $mockController->injectConfigurationManager($mockConfigurationManager);
371  $mockController->_set('request', $this->createMock(Request::class));
372  $view = $this->getMockBuilder(ViewInterface::class)
373  // @deprecated since v11, will be removed with v12: Drop setControllerContext from list
374  ->onlyMethods(['setControllerContext', 'assign', 'assignMultiple', 'render', 'initializeView'])
375  ->addMethods(['setlayoutRootPaths'])
376  ->getMock();
377  $view->expects(self::once())->method('setlayoutRootPaths')->with($expected);
378  $mockController->_call('setViewConfiguration', $view);
379  }
380 
384  public function ‪layoutRootPathDataProvider(): array
385  {
386  return [
387  'text keys' => [
388  [
389  'view' => [
390  'layoutRootPaths' => [
391  'default' => 'some path',
392  'extended' => 'some other path',
393  ],
394  ],
395  ],
396  [
397  'extended' => 'some other path',
398  'default' => 'some path',
399  ],
400  ],
401  'numerical keys' => [
402  [
403  'view' => [
404  'layoutRootPaths' => [
405  '10' => 'some path',
406  '20' => 'some other path',
407  '15' => 'intermediate specific path',
408  ],
409  ],
410  ],
411  [
412  '20' => 'some other path',
413  '15' => 'intermediate specific path',
414  '10' => 'some path',
415  ],
416  ],
417  'mixed keys' => [
418  [
419  'view' => [
420  'layoutRootPaths' => [
421  '10' => 'some path',
422  'very_specific' => 'some other path',
423  '15' => 'intermediate specific path',
424  ],
425  ],
426  ],
427  [
428  '15' => 'intermediate specific path',
429  'very_specific' => 'some other path',
430  '10' => 'some path',
431  ],
432  ],
433  ];
434  }
435 
443  public function ‪setViewConfigurationResolvesPartialRootPathsForPartialRootPath(array $configuration, array $expected): void
444  {
445  $mockController = $this->getAccessibleMockForAbstractClass(ActionController::class, [], '', false, true, true, ['dummy']);
446  $mockConfigurationManager = $this->createMock(ConfigurationManagerInterface::class);
447  $mockConfigurationManager->method('getConfiguration')->willReturn($configuration);
448  $mockController->injectConfigurationManager($mockConfigurationManager);
449  $mockController->_set('request', $this->createMock(Request::class));
450  $view = $this->getMockBuilder(ViewInterface::class)
451  // @deprecated since v11, will be removed with v12: Drop setControllerContext from list
452  ->onlyMethods(['setControllerContext', 'assign', 'assignMultiple', 'render', 'initializeView'])
453  ->addMethods(['setpartialRootPaths'])
454  ->getMock();
455  $view->expects(self::once())->method('setpartialRootPaths')->with($expected);
456  $mockController->_call('setViewConfiguration', $view);
457  }
458 
462  public function ‪partialRootPathDataProvider(): array
463  {
464  return [
465  'text keys' => [
466  [
467  'view' => [
468  'partialRootPaths' => [
469  'default' => 'some path',
470  'extended' => 'some other path',
471  ],
472  ],
473  ],
474  [
475  'extended' => 'some other path',
476  'default' => 'some path',
477  ],
478  ],
479  'numerical keys' => [
480  [
481  'view' => [
482  'partialRootPaths' => [
483  '10' => 'some path',
484  '20' => 'some other path',
485  '15' => 'intermediate specific path',
486  ],
487  ],
488  ],
489  [
490  '20' => 'some other path',
491  '15' => 'intermediate specific path',
492  '10' => 'some path',
493  ],
494  ],
495  'mixed keys' => [
496  [
497  'view' => [
498  'partialRootPaths' => [
499  '10' => 'some path',
500  'very_specific' => 'some other path',
501  '15' => 'intermediate specific path',
502  ],
503  ],
504  ],
505  [
506  '15' => 'intermediate specific path',
507  'very_specific' => 'some other path',
508  '10' => 'some path',
509  ],
510  ],
511  ];
512  }
513 
522  public function ‪rendersAndAssignsAssetsFromViewIntoPageRenderer($viewMock, ?string $expectedHeader, ?string $expectedFooter): void
523  {
524  $pageRenderer = $this->prophesize(PageRenderer::class);
525  GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRenderer->reveal());
526  if (!empty(trim($expectedHeader ?? ''))) {
527  $pageRenderer->addHeaderData($expectedHeader)->shouldBeCalled();
528  } else {
529  $pageRenderer->addHeaderData(Argument::any())->shouldNotBeCalled();
530  }
531  if (!empty(trim($expectedFooter ?? ''))) {
532  $pageRenderer->addFooterData($expectedFooter)->shouldBeCalled();
533  } else {
534  $pageRenderer->addFooterData(Argument::any())->shouldNotBeCalled();
535  }
536  $requestMock = $this->getMockBuilder(RequestInterface::class)->getMockForAbstractClass();
537  $subject = new class () extends ActionController {};
538  $viewProperty = new \ReflectionProperty($subject, 'view');
539  $viewProperty->setAccessible(true);
540  $viewProperty->setValue($subject, $viewMock);
541 
542  $method = new \ReflectionMethod($subject, 'renderAssetsForRequest');
543  $method->setAccessible(true);
544  $method->invokeArgs($subject, [$requestMock]);
545  }
546 
550  public function ‪headerAssetDataProvider(): array
551  {
552  $viewWithHeaderData = $this->getMockBuilder(FluidTemplateView::class)->onlyMethods(['renderSection'])->disableOriginalConstructor()->getMock();
553  $viewWithHeaderData->expects(self::exactly(2))->method('renderSection')
554  ->withConsecutive(
555  ['HeaderAssets', self::anything(), true],
556  ['FooterAssets', self::anything(), true]
557  )
558  ->willReturnOnConsecutiveCalls('custom-header-data', '');
559  $viewWithFooterData = $this->getMockBuilder(FluidTemplateView::class)->onlyMethods(['renderSection'])->disableOriginalConstructor()->getMock();
560  $viewWithFooterData->expects(self::exactly(2))->method('renderSection')
561  ->withConsecutive(
562  ['HeaderAssets', self::anything(), true],
563  ['FooterAssets', self::anything(), true]
564  )
565  ->willReturnOnConsecutiveCalls('', 'custom-footer-data');
566  $viewWithBothData = $this->getMockBuilder(FluidTemplateView::class)->onlyMethods(['renderSection'])->disableOriginalConstructor()->getMock();
567  $viewWithBothData->expects(self::exactly(2))->method('renderSection')
568  ->withConsecutive(
569  ['HeaderAssets', self::anything(), true],
570  ['FooterAssets', self::anything(), true]
571  )
572  ->willReturnOnConsecutiveCalls('custom-header-data', 'custom-footer-data');
573  $invalidView = $this->getMockBuilder(AbstractView::class)->disableOriginalConstructor()->getMockForAbstractClass();
574  return [
575  [$viewWithHeaderData, 'custom-header-data', null],
576  [$viewWithFooterData, null, 'custom-footer-data'],
577  [$viewWithBothData, 'custom-header-data', 'custom-footer-data'],
578  [$invalidView, null, null],
579  ];
580  }
581 
585  public function ‪addFlashMessageDataProvider(): array
586  {
587  return [
588  [
589  new FlashMessage('Simple Message'),
590  'Simple Message',
591  '',
593  false,
594  ],
595  [
596  new FlashMessage('Some OK', 'Message Title', ‪FlashMessage::OK, true),
597  'Some OK',
598  'Message Title',
600  true,
601  ],
602  [
603  new FlashMessage('Some Info', 'Message Title', ‪FlashMessage::INFO, true),
604  'Some Info',
605  'Message Title',
607  true,
608  ],
609  [
610  new FlashMessage('Some Notice', 'Message Title', ‪FlashMessage::NOTICE, true),
611  'Some Notice',
612  'Message Title',
614  true,
615  ],
616 
617  [
618  new FlashMessage('Some Warning', 'Message Title', ‪FlashMessage::WARNING, true),
619  'Some Warning',
620  'Message Title',
622  true,
623  ],
624  [
625  new FlashMessage('Some Error', 'Message Title', ‪FlashMessage::ERROR, true),
626  'Some Error',
627  'Message Title',
629  true,
630  ],
631  ];
632  }
633 
639  $expectedMessage,
640  $messageBody,
641  $messageTitle = '',
642  $severity = ‪FlashMessage::OK,
643  $storeInSession = true
644  ): void {
645  $flashMessageQueue = $this->getMockBuilder(FlashMessageQueue::class)
646  ->onlyMethods(['enqueue'])
647  ->setConstructorArgs([‪StringUtility::getUniqueId('identifier_')])
648  ->getMock();
649 
650  $flashMessageQueue->expects(self::once())->method('enqueue')->with(self::equalTo($expectedMessage));
651 
652  $controller = $this->getAccessibleMockForAbstractClass(
653  ActionController::class,
654  [],
655  '',
656  false,
657  true,
658  true,
659  ['dummy']
660  );
661 
662  $flashMessageService = $this->prophesize(FlashMessageService::class);
663  $flashMessageService->getMessageQueueByIdentifier(Argument::cetera())->willReturn($flashMessageQueue);
664  $controller->injectInternalFlashMessageService($flashMessageService->reveal());
665 
666  $extensionService = $this->prophesize(ExtensionService::class);
667  $extensionService->getPluginNamespace(Argument::cetera(), Argument::cetera())->willReturn('');
668  $controller->injectInternalExtensionService($extensionService->reveal());
669 
670  $controller->_set('request', new Request());
671 
672  $controller->addFlashMessage($messageBody, $messageTitle, $severity, $storeInSession);
673  }
674 
679  {
680  $this->expectException(\InvalidArgumentException::class);
681  $this->expectExceptionCode(1243258395);
682  $controller = new class () extends ActionController {};
683  $controller->addFlashMessage(new \stdClass());
684  }
685 }
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\$actionController
‪ActionController MockObject AccessibleObjectInterface $actionController
Definition: ActionControllerTest.php:58
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller
Definition: ActionControllerTest.php:18
‪TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder
Definition: UriBuilder.php:41
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\addFlashMessageAddsFlashMessageObjectToFlashMessageQueue
‪addFlashMessageAddsFlashMessageObjectToFlashMessageQueue( $expectedMessage, $messageBody, $messageTitle='', $severity=FlashMessage::OK, $storeInSession=true)
Definition: ActionControllerTest.php:635
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\layoutRootPathDataProvider
‪array layoutRootPathDataProvider()
Definition: ActionControllerTest.php:381
‪TYPO3\CMS\Extbase\Mvc\Controller\Arguments
Definition: Arguments.php:27
‪TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentTypeException
Definition: InvalidArgumentTypeException.php:25
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:28
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\$mockMvcPropertyMappingConfigurationService
‪MvcPropertyMappingConfigurationService $mockMvcPropertyMappingConfigurationService
Definition: ActionControllerTest.php:62
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage
‪addFlashMessage($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
Definition: ActionController.php:828
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\headerAssetDataProvider
‪array headerAssetDataProvider()
Definition: ActionControllerTest.php:547
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\$mockObjectManager
‪ObjectManagerInterface $mockObjectManager
Definition: ActionControllerTest.php:60
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\templateRootPathDataProvider
‪array templateRootPathDataProvider()
Definition: ActionControllerTest.php:303
‪TYPO3\CMS\Extbase\Object\ObjectManagerInterface
Definition: ObjectManagerInterface.php:29
‪TYPO3\CMS\Extbase\Reflection\ReflectionService
Definition: ReflectionService.php:28
‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:30
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\addFlashMessageDataProvider
‪array addFlashMessageDataProvider()
Definition: ActionControllerTest.php:582
‪TYPO3\CMS\Extbase\Reflection\ClassSchema
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\partialRootPathDataProvider
‪array partialRootPathDataProvider()
Definition: ActionControllerTest.php:459
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\$resetSingletonInstances
‪bool $resetSingletonInstances
Definition: ActionControllerTest.php:54
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\setViewConfigurationResolvesPartialRootPathsForPartialRootPath
‪setViewConfigurationResolvesPartialRootPathsForPartialRootPath(array $configuration, array $expected)
Definition: ActionControllerTest.php:440
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\rendersAndAssignsAssetsFromViewIntoPageRenderer
‪rendersAndAssignsAssetsFromViewIntoPageRenderer($viewMock, ?string $expectedHeader, ?string $expectedFooter)
Definition: ActionControllerTest.php:519
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\resolveActionMethodNameReturnsTheCurrentActionMethodNameFromTheRequest
‪resolveActionMethodNameReturnsTheCurrentActionMethodNameFromTheRequest()
Definition: ActionControllerTest.php:67
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\resolveActionMethodNameThrowsAnExceptionIfTheActionDefinedInTheRequestDoesNotExist
‪resolveActionMethodNameThrowsAnExceptionIfTheActionDefinedInTheRequestDoesNotExist()
Definition: ActionControllerTest.php:79
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
Definition: ViewInterface.php:26
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\addFlashMessageThrowsExceptionOnInvalidMessageBody
‪addFlashMessageThrowsExceptionOnInvalidMessageBody()
Definition: ActionControllerTest.php:675
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Extbase\Reflection\ClassSchema\Method
Definition: Method.php:27
‪TYPO3\CMS\Extbase\Mvc\RequestInterface
Definition: RequestInterface.php:27
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:128
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:26
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath
‪setViewConfigurationResolvesTemplateRootPathsForTemplateRootPath(array $configuration, array $expected)
Definition: ActionControllerTest.php:284
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\initializeActionMethodArgumentsRegistersArgumentsFoundInTheSignatureOfTheCurrentActionMethod
‪initializeActionMethodArgumentsRegistersArgumentsFoundInTheSignatureOfTheCurrentActionMethod()
Definition: ActionControllerTest.php:95
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\initializeActionMethodArgumentsThrowsExceptionIfDataTypeWasNotSpecified
‪initializeActionMethodArgumentsThrowsExceptionIfDataTypeWasNotSpecified()
Definition: ActionControllerTest.php:236
‪TYPO3\CMS\Extbase\Service\ExtensionService
Definition: ExtensionService.php:34
‪TYPO3\CMS\Extbase\Mvc\Controller\ActionController
Definition: ActionController.php:65
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest
Definition: ActionControllerTest.php:50
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\initializeActionMethodArgumentsRegistersOptionalArgumentsAsSuch
‪initializeActionMethodArgumentsRegistersOptionalArgumentsAsSuch()
Definition: ActionControllerTest.php:166
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService
Definition: MvcPropertyMappingConfigurationService.php:46
‪TYPO3\CMS\Extbase\Mvc\Exception\NoSuchActionException
Definition: NoSuchActionException.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29
‪TYPO3\CMS\Extbase\Mvc\Request
Definition: Request.php:39
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:27
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\$mockUriBuilder
‪UriBuilder $mockUriBuilder
Definition: ActionControllerTest.php:61
‪TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath
‪setViewConfigurationResolvesLayoutRootPathsForLayoutRootPath(array $configuration, array $expected)
Definition: ActionControllerTest.php:362