TYPO3 CMS  TYPO3_7-6
CategoryTest.php
Go to the documentation of this file.
1 <?php
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 
21 {
25  protected $fixture = null;
26 
27  protected function setUp()
28  {
29  $this->fixture = new \TYPO3\CMS\Extbase\Domain\Model\Category();
30  }
31 
36  {
37  $this->assertSame('', $this->fixture->getTitle());
38  }
39 
43  public function setTitleSetsTitle()
44  {
45  $this->fixture->setTitle('foo bar');
46  $this->assertSame('foo bar', $this->fixture->getTitle());
47  }
48 
53  {
54  $this->assertSame('', $this->fixture->getDescription());
55  }
56 
61  {
62  $this->fixture->setDescription('foo bar');
63  $this->assertSame('foo bar', $this->fixture->getDescription());
64  }
65 
70  {
71  $this->assertSame('', $this->fixture->getIcon());
72  }
73 
77  public function setIconSetsIcon()
78  {
79  $this->fixture->setIcon('icon.png');
80  $this->assertSame('icon.png', $this->fixture->getIcon());
81  }
82 
87  {
88  $this->assertNull($this->fixture->getParent());
89  }
90 
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 }