| Total Complexity | 4 |
| Total Lines | 66 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 9 | class TipTest extends SapphireTest |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Ensure the correct defaults are output in the schema |
||
| 13 | */ |
||
| 14 | public function testGeneratesAccurateDefaultSchema() |
||
| 15 | { |
||
| 16 | $tip = new Tip('message'); |
||
| 17 | |||
| 18 | $schema = $tip->getTipSchema(); |
||
| 19 | |||
| 20 | $this->assertEquals( |
||
| 21 | [ |
||
| 22 | 'content' => 'message', |
||
| 23 | 'icon' => 'lamp', |
||
| 24 | 'importance' => 'normal', |
||
| 25 | ], |
||
| 26 | $schema |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Ensure custom settings are output in the schema |
||
| 32 | */ |
||
| 33 | public function testGeneratesAccurateCustomSchema() |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Ensure passing an invalid importance level to the constructor fails |
||
| 55 | * |
||
| 56 | * @expectedException InvalidArgumentException |
||
| 57 | * @expectedExceptionMessage Provided importance level must be defined in Tip::IMPORTANCE_LEVELS |
||
| 58 | */ |
||
| 59 | public function testInvalidImportanceLevelInConstructorCausesException() |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Ensure setting an invalid importance level fails |
||
| 66 | * |
||
| 67 | * @expectedException InvalidArgumentException |
||
| 68 | * @expectedExceptionMessage Provided importance level must be defined in Tip::IMPORTANCE_LEVELS |
||
| 69 | */ |
||
| 70 | public function testInvalidImportanceLevelInSetterCausesException() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |