Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function testNameTrait() |
||
34 | { |
||
35 | $this->assertNull( |
||
36 | $this->fixture->getName(), |
||
37 | '$name doesn\'t start as NULL' |
||
38 | ); |
||
39 | |||
40 | $this->assertEquals( |
||
41 | $this->fixture, |
||
42 | $this->fixture->setName('Bar'), |
||
43 | 'setName() didn\'t return self' |
||
44 | ); |
||
45 | |||
46 | $this->assertEquals( |
||
47 | 'Bar', |
||
48 | $this->fixture->getName() |
||
49 | ); |
||
50 | |||
51 | |||
52 | $this->fixture->setName(null); |
||
53 | $this->assertEquals( |
||
54 | '', |
||
55 | $this->fixture->getName(), |
||
56 | '$name should be an empty string when null is passed' |
||
57 | ); |
||
58 | } |
||
59 | } |
||
60 |