973f2bd0394fb860709ad3e4693e9062942153cf
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Domain / Model / FileMountTest.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Tests\Unit\Domain\Model;
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 FileMountTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
21
22 /**
23 * @var \TYPO3\CMS\Extbase\Domain\Model\FileMount
24 */
25 protected $fixture = NULL;
26
27 protected function setUp() {
28 $this->fixture = new \TYPO3\CMS\Extbase\Domain\Model\FileMount();
29 }
30
31 /**
32 * @test
33 */
34 public function getTitleInitiallyReturnsEmptyString() {
35 $this->assertSame('', $this->fixture->getTitle());
36 }
37
38 /**
39 * @test
40 */
41 public function setTitleSetsTitle() {
42 $title = 'foobar mount';
43 $this->fixture->setTitle($title);
44 $this->assertSame($title, $this->fixture->getTitle());
45 }
46
47 /**
48 * @test
49 */
50 public function getPathInitiallyReturnsEmptyString() {
51 $this->assertSame('', $this->fixture->getPath());
52 }
53
54 /**
55 * @test
56 */
57 public function setPathSetsPath() {
58 $path = 'foo/bar/';
59 $this->fixture->setPath($path);
60 $this->assertSame($path, $this->fixture->getPath());
61 }
62
63 /**
64 * @test
65 */
66 public function getIsAbsolutePathInitiallyReturnsFalse() {
67 $this->assertFalse($this->fixture->getIsAbsolutePath());
68 }
69
70 /**
71 * @test
72 */
73 public function setIsAbsolutePathCanSetBaseIsAbsolutePathToTrue() {
74 $this->fixture->setIsAbsolutePath(TRUE);
75 $this->assertTrue($this->fixture->getIsAbsolutePath());
76 }
77
78 }