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