89 private $pageConfigStructure;
94 private $layoutScheduledSructure;
118 $this->structureMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Data\Structure::class)
119 ->disableOriginalConstructor()
121 $this->processorFactoryMock = $this->createPartialMock(
125 $this->themeResolverMock = $this->getMockForAbstractClass(
126 \
Magento\Framework\View\Design\Theme\ResolverInterface::class
128 $this->processorMock = $this->createMock(\
Magento\Framework\View\Model\
Layout\Merge::class);
129 $this->eventManagerMock = $this->createMock(\
Magento\Framework\
Event\ManagerInterface::class);
130 $this->generatorBlockMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Generator\Block::class)
131 ->disableOriginalConstructor()->getMock();
132 $this->generatorContainerMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Generator\Container::class)
133 ->disableOriginalConstructor()->getMock();
134 $this->cacheMock = $this->getMockBuilder(\
Magento\Framework\Cache\FrontendInterface::class)
135 ->disableOriginalConstructor()
137 $this->readerPoolMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\ReaderPool::class)
138 ->disableOriginalConstructor()
140 $this->messageManagerMock = $this->getMockBuilder(\
Magento\Framework\Message\ManagerInterface::class)
141 ->disableOriginalConstructor()
144 $this->generatorPoolMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\GeneratorPool::class)
145 ->disableOriginalConstructor()->getMock();
146 $this->generatorPoolMock->expects($this->any())
147 ->method(
'getGenerator')
149 $this->returnValueMap([
150 [\
Magento\Framework\View\
Layout\Generator\Block::TYPE, $this->generatorBlockMock],
151 [\
Magento\Framework\View\
Layout\Generator\Container::TYPE, $this->generatorContainerMock],
155 $this->readerContextFactoryMock = $this->getMockBuilder(
157 )->disableOriginalConstructor()->getMock();
159 $this->pageConfigStructure = $this->getMockBuilder(\
Magento\Framework\View\Page\
Config\Structure::class)
160 ->setMethods([
'__toArray',
'populateWithArray'])
162 $this->layoutScheduledSructure = $this->getMockBuilder(\
Magento\Framework\View\
Layout\ScheduledStructure::class)
163 ->setMethods([
'__toArray',
'populateWithArray'])
165 $this->readerContextMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Reader\Context::class)
166 ->setMethods([
'getPageConfigStructure',
'getScheduledStructure'])
167 ->disableOriginalConstructor()
169 $this->readerContextMock->expects($this->any())->method(
'getPageConfigStructure')
170 ->willReturn($this->pageConfigStructure);
171 $this->readerContextMock->expects($this->any())->method(
'getScheduledStructure')
172 ->willReturn($this->layoutScheduledSructure);
174 $this->generatorContextFactoryMock = $this->getMockBuilder(
175 \
Magento\Framework\View\
Layout\Generator\ContextFactory::class
177 ->disableOriginalConstructor()
179 $this->appStateMock = $this->getMockBuilder(\
Magento\Framework\
App\State::class)
180 ->disableOriginalConstructor()
182 $this->loggerMock = $this->getMockBuilder(\Psr\Log\LoggerInterface::class)
184 $this->serializer = $this->createMock(\
Magento\Framework\
Serialize\SerializerInterface::class);
185 $this->serializer->expects($this->any())->method(
'serialize')
186 ->willReturnCallback(
function (
$value) {
187 return json_encode(
$value);
189 $this->serializer->expects($this->any())->method(
'unserialize')
190 ->willReturnCallback(
function (
$value) {
191 return json_decode(
$value,
true);
194 $this->model = new \Magento\Framework\View\Layout(
195 $this->processorFactoryMock,
196 $this->eventManagerMock,
197 $this->structureMock,
198 $this->messageManagerMock,
199 $this->themeResolverMock,
200 $this->readerPoolMock,
201 $this->generatorPoolMock,
203 $this->readerContextFactoryMock,
204 $this->generatorContextFactoryMock,
214 $blockMock = $this->getMockBuilder(\
Magento\Framework\View\
Element\AbstractBlock::class)
215 ->disableOriginalConstructor()
216 ->getMockForAbstractClass();
217 $this->structureMock->expects($this->once())
218 ->method(
'createStructuralElement')
223 )->willReturn(
'blockname');
224 $this->generatorBlockMock->expects($this->once())->method(
'createBlock')->will($this->returnValue($blockMock));
226 $this->model->createBlock(\
Magento\Framework\View\
Element\AbstractBlock::class,
'blockname', []);
227 $this->assertInstanceOf(
229 $this->model->getBlock(
'blockname')
231 $this->assertFalse($this->model->getBlock(
'not_exist'));
236 $themeMock = $this->getMockForAbstractClass(\
Magento\Framework\View\Design\ThemeInterface::class);
238 $this->themeResolverMock->expects($this->once())
240 ->will($this->returnValue($themeMock));
242 $this->processorFactoryMock->expects($this->once())
244 ->with([
'theme' => $themeMock])
245 ->will($this->returnValue($this->processorMock));
247 $this->assertEquals($this->processorMock, $this->model->getUpdate());
248 $this->assertEquals($this->processorMock, $this->model->getUpdate());
253 $themeMock = $this->getMockForAbstractClass(\
Magento\Framework\View\Design\ThemeInterface::class);
255 $this->themeResolverMock->expects($this->once())
257 ->will($this->returnValue($themeMock));
259 $this->processorFactoryMock->expects($this->once())
261 ->with([
'theme' => $themeMock])
262 ->will($this->returnValue($this->processorMock));
264 $xmlString =
'<?xml version="1.0"?><layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' 265 .
'<some_update>123</some_update></layout>';
266 $xml = simplexml_load_string($xmlString, \
Magento\Framework\View\
Layout\Element::class);
267 $this->processorMock->expects($this->once())
268 ->method(
'asSimplexml')
269 ->will($this->returnValue($xml));
271 $this->structureMock->expects($this->once())
272 ->method(
'importElements')
273 ->with($this->equalTo([]))
274 ->will($this->returnSelf());
275 $this->assertSame($this->model, $this->model->generateXml());
276 $this->assertSame(
'<some_update>123</some_update>', $this->model->getNode(
'some_update')->asXML());
281 $customBlockName =
'custom_block';
282 $customBlockParentName =
'custom_block_parent';
283 $customBlockAlias =
'custom_block_alias';
285 $blockMock = $this->getMockBuilder(\
Magento\Framework\View\
Element\Template::class)
286 ->disableOriginalConstructor()
289 $this->structureMock->expects($this->once())
290 ->method(
'getChildId')
291 ->with($customBlockParentName, $customBlockAlias)
292 ->willReturn($customBlockName);
294 $this->structureMock->expects($this->once())
295 ->method(
'hasElement')
296 ->with($customBlockName)
299 $this->structureMock->expects($this->once())
300 ->method(
'getAttribute')
301 ->with($customBlockName,
'type')
304 $this->model->setBlock($customBlockName, $blockMock);
305 $this->assertInstanceOf(
307 $this->model->getChildBlock($customBlockParentName, $customBlockAlias)
313 $this->structureMock->expects($this->once())
314 ->method(
'getChildId')
315 ->with(
'non_exist_parent',
'non_exist_alias')
317 $this->assertFalse($this->model->getChildBlock(
'non_exist_parent',
'non_exist_alias'));
323 $parentName =
'parent';
325 $this->structureMock->expects($this->once())
326 ->method(
'setAsChild')
327 ->with($this->equalTo(
$elementName), $this->equalTo($parentName), $this->equalTo(
$alias))
328 ->will($this->returnSelf());
329 $this->assertSame($this->model, $this->model->setChild($parentName,
$elementName,
$alias));
334 $parentName =
'parent';
336 $this->structureMock->expects($this->once())
337 ->method(
'unsetChild')
338 ->with($this->equalTo($parentName), $this->equalTo(
$alias))
339 ->will($this->returnSelf());
340 $this->assertSame($this->model, $this->model->unsetChild($parentName,
$alias));
345 $parentName =
'parent';
346 $childrenArray = [
'key1' =>
'value1',
'key2' =>
'value2'];
347 $this->structureMock->expects($this->once())
348 ->method(
'getChildren')
349 ->with($this->equalTo($parentName))
350 ->will($this->returnValue($childrenArray));
351 $this->assertSame([
'key1',
'key2'], $this->model->getChildNames($parentName));
356 $parentName =
'parent';
357 $childrenArray = [
'block_name' =>
'value1'];
358 $this->structureMock->expects($this->once())
359 ->method(
'getChildren')
360 ->with($this->equalTo($parentName))
361 ->will($this->returnValue($childrenArray));
363 $blockMock = $this->getMockBuilder(\
Magento\Framework\View\
Element\AbstractBlock::class)
364 ->disableOriginalConstructor()
365 ->getMockForAbstractClass();
366 $this->structureMock->expects($this->once())
367 ->method(
'createStructuralElement')
372 )->willReturn(
'block_name');
373 $this->generatorBlockMock->expects($this->once())->method(
'createBlock')->will($this->returnValue($blockMock));
377 $this->model->createBlock(\
Magento\Framework\View\
Element\AbstractBlock::class,
'block_name', [])
379 $this->assertSame([
'value1' => $blockMock], $this->model->getChildBlocks($parentName));
384 $parentName =
'parent';
386 $this->structureMock->expects($this->once())
387 ->method(
'getChildId')
388 ->with($this->equalTo($parentName), $this->equalTo(
$alias))
389 ->will($this->returnValue(
'1'));
390 $this->assertSame(
'1', $this->model->getChildName($parentName,
$alias));
395 $blockName =
'block_name';
396 $parentGroup =
'parent_group';
397 $this->structureMock->expects($this->once())
398 ->method(
'addToParentGroup')
399 ->with($this->equalTo($blockName), $this->equalTo($parentGroup))
400 ->will($this->returnSelf());
401 $this->assertSame($this->structureMock, $this->model->addToParentGroup($blockName, $parentGroup));
406 $blockName =
'block_name';
407 $groupName =
'group_name';
408 $this->structureMock->expects($this->once())
409 ->method(
'getGroupChildNames')
410 ->with($this->equalTo($blockName), $this->equalTo($groupName))
411 ->will($this->returnSelf());
412 $this->assertSame($this->structureMock, $this->model->getGroupChildNames($blockName, $groupName));
418 $this->structureMock->expects($this->once())
419 ->method(
'hasElement')
421 ->will($this->returnValue(
true));
422 $this->assertTrue($this->model->hasElement(
$elementName));
428 $elementAttr =
'attribute';
430 $this->structureMock->expects($this->once())
431 ->method(
'getAttribute')
432 ->with($this->equalTo(
$elementName), $this->equalTo($elementAttr))
433 ->will($this->returnValue(
$result));
446 $this->structureMock->expects($this->once())
447 ->method(
'hasElement')
449 ->will($this->returnValue($hasElement));
451 $this->structureMock->expects($this->once())
452 ->method(
'getAttribute')
453 ->with($this->equalTo(
$elementName), $this->equalTo(
'type'))
466 [
true,
'container',
true],
467 [
true,
'block',
false],
468 [
true,
'something',
false],
481 $this->structureMock->expects($this->once())
482 ->method(
'getParentId')
484 ->will($this->returnValue($parentName));
486 $this->structureMock->expects($this->once())
487 ->method(
'hasElement')
488 ->with($this->equalTo($parentName))
489 ->will($this->returnValue($containerConfig[
'has_element']));
490 if ($containerConfig[
'has_element']) {
491 $this->structureMock->expects($this->once())
492 ->method(
'getAttribute')
493 ->with($this->equalTo($parentName), $this->equalTo(
'type'))
494 ->will($this->returnValue($containerConfig[
'attribute']));
507 [
'parent', [
'has_element' =>
true,
'attribute' =>
'container'],
true],
508 [
'parent', [
'has_element' =>
true,
'attribute' =>
'block'],
false],
520 $blockName =
'some_name';
521 $blockMock = $this->getMockBuilder(\
Magento\Framework\View\
Element\AbstractBlock::class)
522 ->disableOriginalConstructor()
523 ->getMockForAbstractClass();
524 $this->assertSame($this->model, $this->model->setBlock($blockName, $blockMock));
525 $this->assertSame([$blockName => $blockMock], $this->model->getAllBlocks());
526 $this->structureMock->expects($this->once())
527 ->method(
'unsetElement')
528 ->with($this->equalTo($blockName))
529 ->will($this->returnSelf());
530 $this->assertSame($this->model, $this->model->unsetElement($blockName));
531 $this->assertSame([], $this->model->getAllBlocks());
536 $oldName =
'old_name';
537 $newName =
'new_name';
538 $blockMock = $this->getMockBuilder(\
Magento\Framework\View\
Element\AbstractBlock::class)
539 ->disableOriginalConstructor()
540 ->getMockForAbstractClass();
542 $this->structureMock->expects($this->once())
543 ->method(
'renameElement')
544 ->with($this->equalTo($oldName), $this->equalTo($newName))
545 ->will($this->returnSelf());
546 $this->assertSame($this->model, $this->model->setBlock($oldName, $blockMock));
547 $this->assertSame($this->model, $this->model->renameElement($oldName, $newName));
548 $this->assertSame([$newName => $blockMock], $this->model->getAllBlocks());
553 $childName =
'child_name';
554 $parentId =
'parent_id';
555 $this->structureMock->expects($this->once())
556 ->method(
'getParentId')
557 ->with($this->equalTo($childName))
558 ->will($this->returnValue($parentId));
559 $this->assertSame($parentId, $this->model->getParentName($childName));
564 $name =
'child_name';
565 $parentId =
'parent_id';
567 $this->structureMock->expects($this->once())
568 ->method(
'getParentId')
569 ->with($this->equalTo(
$name))
570 ->will($this->returnValue($parentId));
571 $this->structureMock->expects($this->once())
572 ->method(
'getChildAlias')
573 ->with($this->equalTo($parentId), $this->equalTo(
$name))
574 ->will($this->returnValue(
$alias));
575 $this->assertSame(
$alias, $this->model->getElementAlias(
$name));
580 $this->assertSame($this->model, $this->model->addOutputElement(
'name'));
581 $this->assertSame($this->model, $this->model->removeOutputElement(
'name'));
586 $this->assertFalse($this->model->isPrivate());
587 $this->assertSame($this->model, $this->model->setIsPrivate(
true));
588 $this->assertTrue($this->model->isPrivate());
598 $blockMock = $this->createMock($blockInstance);
599 $this->generatorBlockMock->expects($this->once())->method(
'createBlock')->will($this->returnValue($blockMock));
602 $blockMock->expects($this->any())
603 ->method(
'setLayout')
604 ->with($this->equalTo($this->model))
605 ->will($this->returnSelf());
607 $this->assertInstanceOf($blockInstance, $this->model->getBlockSingleton(
$type));
609 $this->assertInstanceOf($blockInstance, $this->model->getBlockSingleton(
$type));
619 'some_type', \Magento\Framework\View\Element\Template::class,
635 $this->model->addAdjustableRenderer(
636 $rendererData[
'namespace'],
637 $rendererData[
'static_type'],
638 $rendererData[
'dynamic_type'],
639 $rendererData[
'type'],
640 $rendererData[
'template'],
641 $rendererData[
'data']
646 $this->model->getRendererOptions($getData[
'namespace'], $getData[
'static_type'], $getData[
'dynamic_type'])
656 'namespace' =>
'namespace_value',
657 'static_type' =>
'static_type_value',
658 'dynamic_type' =>
'dynamic_type_value',
659 'type' =>
'type_value',
660 'template' =>
'template.phtml',
661 'data' => [
'some' =>
'data'],
664 'wrong namespace' => [
667 'namespace' =>
'wrong namespace',
668 'static_type' =>
'static_type_value',
669 'dynamic_type' =>
'dynamic_type_value',
673 'wrong static type' => [
676 'namespace' =>
'namespace_value',
677 'static_type' =>
'wrong static type',
678 'dynamic_type' =>
'dynamic_type_value',
682 'wrong dynamic type' => [
685 'namespace' =>
'namespace_value',
686 'static_type' =>
'static_type_value',
687 'dynamic_type' =>
'wrong dynamic type',
691 'set and get test' => [
694 'namespace' =>
'namespace_value',
695 'static_type' =>
'static_type_value',
696 'dynamic_type' =>
'dynamic_type_value',
699 'type' =>
'type_value',
700 'template' =>
'template.phtml',
701 'data' => [
'some' =>
'data'],
714 $xml = simplexml_load_string($xmlString, \
Magento\Framework\View\
Layout\Element::class);
715 $this->assertSame($this->model, $this->model->setXml($xml));
716 $this->assertSame(
$result, $this->model->isCacheable());
726 '<?xml version="1.0"?><layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' 727 .
'<block></block></layout>',
731 '<?xml version="1.0"?><layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' 732 .
'<block cacheable="false"></block></layout>',
738 public function testGenerateElementsWithoutCache()
740 $this->readerContextFactoryMock->expects($this->once())
742 ->willReturn($this->readerContextMock);
743 $layoutCacheId =
'layout_cache_id';
744 $handles = [
'default',
'another'];
746 $xml = simplexml_load_string(
'<layout/>', \
Magento\Framework\View\
Layout\Element::class);
747 $this->model->setXml($xml);
749 $themeMock = $this->getMockForAbstractClass(\
Magento\Framework\View\Design\ThemeInterface::class);
750 $this->themeResolverMock->expects($this->once())
752 ->willReturn($themeMock);
753 $this->processorFactoryMock->expects($this->once())
755 ->with([
'theme' => $themeMock])
756 ->willReturn($this->processorMock);
758 $this->processorMock->expects($this->once())
759 ->method(
'getCacheId')
760 ->willReturn($layoutCacheId);
761 $this->processorMock->expects($this->once())
762 ->method(
'getHandles')
763 ->willReturn($handles);
765 $this->cacheMock->expects($this->once())
767 ->with(
'structure_' . $layoutCacheId)
770 $this->readerPoolMock->expects($this->once())
771 ->method(
'interpret')
772 ->with($this->readerContextMock, $xml)
775 $pageConfigStructureData = [
779 'field_3_1' =>
'1244',
781 'field_3_3' =>
false,
784 $this->pageConfigStructure->expects($this->any())->method(
'__toArray')
785 ->willReturn($pageConfigStructureData);
787 $layoutScheduledStructureData = [
789 'field_2' =>
'text_qwertyuiop[]asdfghjkl;' 791 $this->layoutScheduledSructure->expects($this->any())->method(
'__toArray')
792 ->willReturn($layoutScheduledStructureData);
794 'pageConfigStructure' => $pageConfigStructureData,
795 'scheduledStructure' => $layoutScheduledStructureData
798 $this->cacheMock->expects($this->once())
800 ->with(json_encode(
$data),
'structure_' . $layoutCacheId, $handles)
803 $generatorContextMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Generator\Context::class)
804 ->disableOriginalConstructor()
806 $this->generatorContextFactoryMock->expects($this->once())
808 ->with([
'structure' => $this->structureMock,
'layout' => $this->model])
809 ->willReturn($generatorContextMock);
811 $this->generatorPoolMock->expects($this->once())
813 ->with($this->readerContextMock, $generatorContextMock)
817 'name_1' => [
'type' =>
'',
'parent' =>
null],
818 'name_2' => [
'type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER,
'parent' =>
null],
819 'name_3' => [
'type' =>
'',
'parent' =>
'parent'],
820 'name_4' => [
'type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER,
'parent' =>
'parent'],
823 $this->structureMock->expects($this->once())
824 ->method(
'exportElements')
825 ->willReturn($elements);
827 $this->model->generateElements();
830 public function testGenerateElementsWithCache()
832 $layoutCacheId =
'layout_cache_id';
834 $xml = simplexml_load_string(
'<layout/>', \
Magento\Framework\View\
Layout\Element::class);
835 $this->model->setXml($xml);
837 $this->readerContextFactoryMock->expects($this->once())
839 ->willReturn($this->readerContextMock);
840 $themeMock = $this->getMockForAbstractClass(\
Magento\Framework\View\Design\ThemeInterface::class);
841 $this->themeResolverMock->expects($this->once())
843 ->willReturn($themeMock);
844 $this->processorFactoryMock->expects($this->once())
846 ->with([
'theme' => $themeMock])
847 ->willReturn($this->processorMock);
849 $this->processorMock->expects($this->once())
850 ->method(
'getCacheId')
851 ->willReturn($layoutCacheId);
853 $pageConfigStructureData = [
857 'field_3_1' =>
'1244',
859 'field_3_3' =>
false,
862 $this->pageConfigStructure->expects($this->once())->method(
'populateWithArray')
863 ->with($pageConfigStructureData);
865 $layoutScheduledStructureData = [
867 'field_2' =>
'text_qwertyuiop[]asdfghjkl;' 869 $this->layoutScheduledSructure->expects($this->once())->method(
'populateWithArray')
870 ->with($layoutScheduledStructureData);
872 'pageConfigStructure' => $pageConfigStructureData,
873 'scheduledStructure' => $layoutScheduledStructureData
876 $this->cacheMock->expects($this->once())
878 ->with(
'structure_' . $layoutCacheId)
879 ->willReturn(json_encode(
$data));
881 $this->readerPoolMock->expects($this->never())
882 ->method(
'interpret');
883 $this->cacheMock->expects($this->never())
886 $generatorContextMock = $this->getMockBuilder(\
Magento\Framework\View\
Layout\Generator\Context::class)
887 ->disableOriginalConstructor()
889 $this->generatorContextFactoryMock->expects($this->once())
891 ->with([
'structure' => $this->structureMock,
'layout' => $this->model])
892 ->willReturn($generatorContextMock);
894 $this->generatorPoolMock->expects($this->once())
896 ->with($this->readerContextMock, $generatorContextMock)
900 'name_1' => [
'type' =>
'',
'parent' =>
null],
901 'name_2' => [
'type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER,
'parent' =>
null],
902 'name_3' => [
'type' =>
'',
'parent' =>
'parent'],
903 'name_4' => [
'type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER,
'parent' =>
'parent'],
906 $this->structureMock->expects($this->once())
907 ->method(
'exportElements')
908 ->willReturn($elements);
910 $this->model->generateElements();
925 $name =
'test_container';
926 $child =
'child_block';
928 $blockHtml =
'<html/>';
930 $this->structureMock->expects($this->atLeastOnce())
931 ->method(
'getAttribute')
934 [
$name,
'display', $displayValue],
935 [$child,
'display', $displayValue],
940 $this->structureMock->expects($this->atLeastOnce())->method(
'hasElement')
947 $this->structureMock->expects($this->once())
948 ->method(
'getChildren')
953 $block->expects($this->once())->method(
'toHtml')->willReturn($blockHtml);
955 $renderingOutput = new \Magento\Framework\DataObject();
956 $renderingOutput->setData(
'output', $blockHtml);
958 $this->eventManagerMock->expects($this->at(0))
961 'core_layout_render_element',
962 [
'element_name' => $child,
'layout' => $this->model,
'transport' => $renderingOutput]
964 $this->eventManagerMock->expects($this->at(1))
967 'core_layout_render_element',
968 [
'element_name' =>
$name,
'layout' => $this->model,
'transport' => $renderingOutput]
971 $this->model->setBlock($child,
$block);
972 $this->assertEquals($blockHtml, $this->model->renderElement(
$name,
false));
981 $displayValue =
'false';
982 $name =
'test_container';
985 $this->structureMock->expects($this->atLeastOnce())
986 ->method(
'getAttribute')
987 ->willReturnMap([[
$name,
'display', $displayValue]]);
989 $this->assertEquals($blockHtml, $this->model->renderElement(
$name,
false));
testRenderElementDoNotDisplay($displayValue)
testIsCacheable($xmlString, $result)
testIsManipulationAllowed($parentName, $containerConfig, $result)
isManipulationAllowedDataProvider()
testGetChildNonExistBlock()
renderElementDisplayDataProvider()
getRendererOptionsDataProvider()
testAddRemoveOutputElement()
isCacheableDataProvider()
testAddGetRendererOptions($rendererData, $getData, $result)
isContainerDataProvider()
testIsContainer($hasElement, $attribute, $result)
renderElementDoNotDisplayDataProvider()
$generatorContextFactoryMock
testRenderElementDisplay($displayValue)
getBlockSingletonDataProvider()
$readerContextFactoryMock
testGetBlockSingleton($type, $blockInstance, $isAbstract)
if(!isset($_GET['name'])) $name