Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testReadableName() |
||
13 | { |
||
14 | $field = new ResourceField(); |
||
15 | $field->Name = 'Teachers_In-mY-Country'; |
||
|
|||
16 | $field->write(); |
||
17 | |||
18 | $this->assertSame( |
||
19 | 'Teachers in my country', |
||
20 | $field->ReadableName, |
||
21 | 'Readable name should be generated on write' |
||
22 | ); |
||
23 | |||
24 | $field->Name = 'Some-new_Name'; |
||
25 | $field->write(); |
||
26 | |||
27 | $this->assertSame( |
||
28 | 'Teachers in my country', |
||
29 | $field->ReadableName, |
||
30 | 'Readable name should not be changed automatically once it is set' |
||
31 | ); |
||
34 |