| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function testThrowExceptionIfMoreThanOneIdentifierAttribute() |
||
| 29 | { |
||
| 30 | $this |
||
| 31 | ->given($testedInstance = $this->newTestedInstance('key', 'Model', 'ModelRepository')) |
||
| 32 | ->exception(function () use ($testedInstance) { |
||
| 33 | $testedInstance->setAttributeList([ |
||
| 34 | new Attribute('a first id', null, null, true), |
||
| 35 | new Attribute('a second id', null, null, true), |
||
| 36 | ]); |
||
| 37 | }) |
||
| 38 | ->isInstanceOf(MoreThanOneIdentifierException::class) |
||
| 39 | ->hasMessage('Class metadata for model "Model" already has an identifier named "a first id". Only one identifier is allowed.') |
||
| 40 | ; |
||
| 43 |