| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ClassMetadata extends atoum |
||
| 13 | { |
||
| 14 | public function testSetAttributeListWithoutId() |
||
| 15 | { |
||
| 16 | $this |
||
| 17 | ->given($testedInstance = $this->newTestedInstance('key', 'Model', 'ModelRepository')) |
||
| 18 | ->and($testedInstance->setAttributeList([ |
||
| 19 | new Attribute('not an id'), |
||
| 20 | ])) |
||
| 21 | ->exception(function () use ($testedInstance) { |
||
| 22 | $testedInstance->getIdentifierAttribute(); |
||
| 23 | }) |
||
| 24 | ->isInstanceOf(MissingIdentifierException::class) |
||
| 25 | ; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testThrowExceptionIfMoreThanOneIdentifierAttribute() |
||
| 40 | ; |
||
| 41 | } |
||
| 43 |