2 namespace TYPO3\CMS\Extensionmanager\Tests\Unit\Domain\Repository;
33 protected function setUp()
35 $this->mockObjectManager = $this->getMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
37 $this->subject = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository::class, array(
'findAll'), array($this->mockObjectManager));
46 ->expects($this->once())
48 ->will($this->returnValue(array()));
50 $this->assertNull($this->subject->findOneTypo3OrgRepository());
58 $mockModelOne = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
60 ->expects(($this->once()))
62 ->will($this->returnValue(
'foo'));
63 $mockModelTwo = $this->getMock(\TYPO3\CMS\Extensionmanager\Domain\Model\Repository::class);
65 ->expects(($this->once()))
67 ->will($this->returnValue(
'TYPO3.org Main Repository'));
70 ->expects($this->once())
72 ->will($this->returnValue(array($mockModelOne, $mockModelTwo)));
74 $this->assertSame($mockModelTwo, $this->subject->findOneTypo3OrgRepository());