33 public function setUp() {
34 $this->mockObjectManager = $this->getMock(
'TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
36 $this->fixture = $this->getMock(
'TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository', array(
'findAll'), array($this->mockObjectManager));
45 ->expects($this->once())
47 ->will($this->returnValue(array()));
49 $this->assertNull($this->fixture->findOneTypo3OrgRepository());
56 $mockModelOne = $this->getMock(
'TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
58 ->expects(($this->once()))
60 ->will($this->returnValue(
'foo'));
61 $mockModelTwo = $this->getMock(
'TYPO3\\CMS\\Extensionmanager\\Domain\\Model\\Repository');
63 ->expects(($this->once()))
65 ->will($this->returnValue(
'TYPO3.org Main Repository'));
68 ->expects($this->once())
70 ->will($this->returnValue(array($mockModelOne, $mockModelTwo)));
72 $this->assertSame($mockModelTwo, $this->fixture->findOneTypo3OrgRepository());
findOneTypo3OrgRepositoryReturnsRepositoryWithCorrectTitle()
findOneTypo3OrgRepositoryReturnsNullIfNoRepositoryWithThisTitleExists()