| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function testTitleTrait() |
||
| 34 | { |
||
| 35 | $this->fixture = $this->getMockForTrait('Axstrad\Common\Traits\TitleTrait'); |
||
| 36 | |||
| 37 | $this->assertNull( |
||
| 38 | $this->fixture->getTitle(), |
||
| 39 | '$title doesn\'t start as NULL' |
||
| 40 | ); |
||
| 41 | |||
| 42 | $this->assertEquals( |
||
| 43 | $this->fixture, |
||
| 44 | $this->fixture->setTitle('Bar'), |
||
| 45 | 'setTitle() didn\'t return self' |
||
| 46 | ); |
||
| 47 | |||
| 48 | $this->assertEquals( |
||
| 49 | 'Bar', |
||
| 50 | $this->fixture->getTitle() |
||
| 51 | ); |
||
| 52 | |||
| 53 | |||
| 54 | $this->fixture->setTitle(null); |
||
| 55 | $this->assertEquals( |
||
| 56 | '', |
||
| 57 | $this->fixture->getTitle(), |
||
| 58 | '$title should be an empty string when null is passed' |
||
| 59 | ); |
||
| 60 | } |
||
| 61 | } |
||
| 62 |