[BUGFIX] Add missing namespace parts
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Domain / Model / CategoryTest.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 CategoryTest extends \TYPO3\Components\TestingFramework\Core\Unit\UnitTestCase
21 {
22 /**
23 * @var \TYPO3\CMS\Extbase\Domain\Model\Category
24 */
25 protected $fixture = null;
26
27 protected function setUp()
28 {
29 $this->fixture = new \TYPO3\CMS\Extbase\Domain\Model\Category();
30 }
31
32 /**
33 * @test
34 */
35 public function getTitleInitiallyReturnsEmptyString()
36 {
37 $this->assertSame('', $this->fixture->getTitle());
38 }
39
40 /**
41 * @test
42 */
43 public function setTitleSetsTitle()
44 {
45 $this->fixture->setTitle('foo bar');
46 $this->assertSame('foo bar', $this->fixture->getTitle());
47 }
48
49 /**
50 * @test
51 */
52 public function getDescriptionInitiallyReturnsEmptyString()
53 {
54 $this->assertSame('', $this->fixture->getDescription());
55 }
56
57 /**
58 * @test
59 */
60 public function setDescriptionSetsDescription()
61 {
62 $this->fixture->setDescription('foo bar');
63 $this->assertSame('foo bar', $this->fixture->getDescription());
64 }
65
66 /**
67 * @test
68 */
69 public function getIconInitiallyReturnsEmptyString()
70 {
71 $this->assertSame('', $this->fixture->getIcon());
72 }
73
74 /**
75 * @test
76 */
77 public function setIconSetsIcon()
78 {
79 $this->fixture->setIcon('icon.png');
80 $this->assertSame('icon.png', $this->fixture->getIcon());
81 }
82
83 /**
84 * @test
85 */
86 public function getParentInitiallyReturnsNull()
87 {
88 $this->assertNull($this->fixture->getParent());
89 }
90
91 /**
92 * @test
93 */
94 public function setParentSetsParent()
95 {
96 $parent = new \TYPO3\CMS\Extbase\Domain\Model\Category();
97 $this->fixture->setParent($parent);
98 $this->assertSame($parent, $this->fixture->getParent());
99 }
100 }