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