TYPO3 CMS  TYPO3_6-2
CategoryTest.php
Go to the documentation of this file.
1 <?php
3 
21 
25  protected $fixture = NULL;
26 
27  public function setUp() {
28  $this->fixture = new \TYPO3\CMS\Extbase\Domain\Model\Category();
29  }
30 
35  $this->assertSame('', $this->fixture->getTitle());
36  }
37 
41  public function setTitleSetsTitle() {
42  $this->fixture->setTitle('foo bar');
43  $this->assertSame('foo bar', $this->fixture->getTitle());
44  }
45 
50  $this->assertSame('', $this->fixture->getDescription());
51  }
52 
56  public function setDescriptionSetsDescription() {
57  $this->fixture->setDescription('foo bar');
58  $this->assertSame('foo bar', $this->fixture->getDescription());
59  }
60 
65  $this->assertSame('', $this->fixture->getIcon());
66  }
67 
71  public function setIconSetsIcon() {
72  $this->fixture->setIcon('icon.png');
73  $this->assertSame('icon.png', $this->fixture->getIcon());
74  }
75 
79  public function getParentInitiallyReturnsNull() {
80  $this->assertNull($this->fixture->getParent());
81  }
82 
86  public function setParentSetsParent() {
87  $parent = new \TYPO3\CMS\Extbase\Domain\Model\Category();
88  $this->fixture->setParent($parent);
89  $this->assertSame($parent, $this->fixture->getParent());
90  }
91 }