2 namespace TYPO3\CMS\Backend\Tests\Unit\View\BackendLayout;
28 $identifier = $this->getUniqueId(
'identifier__');
29 new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
37 $identifier = $this->getUniqueId(
'identifier');
38 $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
40 $this->assertEquals($identifier, $backendLayoutCollection->getIdentifier());
49 $identifier = $this->getUniqueId(
'identifier');
50 $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
51 $backendLayoutIdentifier = $this->getUniqueId(
'identifier__');
52 $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array(
'getIdentifier'), array(),
'',
false);
53 $backendLayoutMock->expects($this->once())->method(
'getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
55 $backendLayoutCollection->add($backendLayoutMock);
64 $identifier = $this->getUniqueId(
'identifier');
65 $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
66 $backendLayoutIdentifier = $this->getUniqueId(
'identifier');
67 $firstBackendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array(
'getIdentifier'), array(),
'',
false);
68 $firstBackendLayoutMock->expects($this->once())->method(
'getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
69 $secondBackendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array(
'getIdentifier'), array(),
'',
false);
70 $secondBackendLayoutMock->expects($this->once())->method(
'getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
72 $backendLayoutCollection->add($firstBackendLayoutMock);
73 $backendLayoutCollection->add($secondBackendLayoutMock);
81 $identifier = $this->getUniqueId(
'identifier');
82 $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
83 $backendLayoutIdentifier = $this->getUniqueId(
'identifier');
84 $backendLayoutMock = $this->getMock(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class, array(
'getIdentifier'), array(),
'',
false);
85 $backendLayoutMock->expects($this->once())->method(
'getIdentifier')->will($this->returnValue($backendLayoutIdentifier));
87 $backendLayoutCollection->add($backendLayoutMock);
89 $this->assertEquals($backendLayoutMock, $backendLayoutCollection->get($backendLayoutIdentifier));