f612c1664d95639d1cdfe999e0f54770dc8f91fc
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Domain / Repository / FileMountRepositoryTest.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Tests\Unit\Domain\Repository;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Test case
19 */
20 class FileMountRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
21
22 /**
23 * @var \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository
24 */
25 protected $fixture = NULL;
26
27 protected function setUp() {
28 $this->fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface'));
29 }
30
31 /**
32 * @test
33 */
34 public function initializeObjectSetsRespectStoragePidToFalse() {
35 /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */
36 $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface');
37 $fixture = new \TYPO3\CMS\Extbase\Domain\Repository\FileMountRepository($objectManager);
38 $querySettings = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
39 $querySettings->expects($this->once())->method('setRespectStoragePage')->with(FALSE);
40 $objectManager->expects($this->once())->method('get')->with('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings')->will($this->returnValue($querySettings));
41 $fixture->initializeObject();
42 }
43 }