| 1 | <?php |
||
| 15 | class TagTest extends TestCase |
||
| 16 | { |
||
| 17 | private $tag; |
||
| 18 | |||
| 19 | protected function setUp() |
||
| 20 | { |
||
| 21 | $this->tag = new Tag('test-id', 'testTitle'); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function testGetId() |
||
| 25 | { |
||
| 26 | $this->assertSame('test-id', $this->tag->getId()); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function testGetTitle() |
||
| 30 | { |
||
| 31 | $this->assertSame('testTitle', $this->tag->getTitle()); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function testTitleDefaultsToId() |
||
| 35 | { |
||
| 36 | $tag = new Tag('testId'); |
||
| 37 | $this->assertSame('testId', $tag->getTitle()); |
||
| 38 | } |
||
| 39 | } |