@@ -167,23 +167,6 @@ public function testSettings() : void
167167 self ::assertSame ('sqlGenerator ' , $ command ->getName ());
168168 }
169169
170- public function testDuplicateColumns () : void
171- {
172- $ application = new \Symfony \Component \Console \Application ();
173- $ application ->addCommands ([new \CoolBeans \Command \SqlGeneratorCommand ()]);
174-
175- $ command = $ application ->find ('sqlGenerator ' );
176- $ commandTester = new \Symfony \Component \Console \Tester \CommandTester ($ command );
177-
178- $ this ->expectException (\CoolBeans \Exception \ClassUniqueConstraintDuplicateColumns::class);
179- $ this ->expectExceptionMessage ('Found duplicate columns defined in ClassUniqueConstraint attribute. ' );
180-
181- $ commandTester ->execute ([
182- 'command ' => 'sqlGenerator ' ,
183- 'source ' => __DIR__ . '/../InvalidBean/DuplicateColumns/ ' ,
184- ]);
185- }
186-
187170 public function testUndefinedProperty () : void
188171 {
189172 $ application = new \Symfony \Component \Console \Application ();
@@ -192,8 +175,8 @@ public function testUndefinedProperty() : void
192175 $ command = $ application ->find ('sqlGenerator ' );
193176 $ commandTester = new \Symfony \Component \Console \Tester \CommandTester ($ command );
194177
195- $ this ->expectException (\CoolBeans \Exception \ClassUniqueConstraintUndefinedProperty ::class);
196- $ this ->expectExceptionMessage ('Property with name " invalid" given in ClassUniqueConstraint is not defined . ' );
178+ $ this ->expectException (\CoolBeans \Exception \UnknownColumnInColumnArray ::class);
179+ $ this ->expectExceptionMessage ('Column [ invalid] given in column array doesnt exist in Bean InvalidBean . ' );
197180
198181 $ commandTester ->execute ([
199182 'command ' => 'sqlGenerator ' ,
@@ -209,32 +192,15 @@ public function testMissingPrimaryKey() : void
209192 $ command = $ application ->find ('sqlGenerator ' );
210193 $ commandTester = new \Symfony \Component \Console \Tester \CommandTester ($ command );
211194
212- $ this ->expectException (\CoolBeans \Exception \MissingPrimaryKey ::class);
213- $ this ->expectExceptionMessage ('Bean InvalidBean has no primary key . ' );
195+ $ this ->expectException (\CoolBeans \Exception \UnknownColumnInColumnArray ::class);
196+ $ this ->expectExceptionMessage ('Column [id] given in column array doesnt exist in Bean InvalidBean . ' );
214197
215198 $ commandTester ->execute ([
216199 'command ' => 'sqlGenerator ' ,
217200 'source ' => __DIR__ . '/../InvalidBean/MissingPrimaryKey/ ' ,
218201 ]);
219202 }
220203
221- public function testPrimaryKeyAttributeMultipleColumns () : void
222- {
223- $ application = new \Symfony \Component \Console \Application ();
224- $ application ->addCommands ([new \CoolBeans \Command \SqlGeneratorCommand ()]);
225-
226- $ command = $ application ->find ('sqlGenerator ' );
227- $ commandTester = new \Symfony \Component \Console \Tester \CommandTester ($ command );
228-
229- $ this ->expectException (\CoolBeans \Exception \PrimaryKeyMultipleColumnsNotImplemented::class);
230- $ this ->expectExceptionMessage ('Multiple column PrimaryKey is not implemented yet. ' );
231-
232- $ commandTester ->execute ([
233- 'command ' => 'sqlGenerator ' ,
234- 'source ' => __DIR__ . '/../InvalidBean/PrimaryKeyAttributeMultipleColumns/ ' ,
235- ]);
236- }
237-
238204 public function testPrimaryKeyAttributeMissingColumn () : void
239205 {
240206 $ application = new \Symfony \Component \Console \Application ();
@@ -243,8 +209,8 @@ public function testPrimaryKeyAttributeMissingColumn() : void
243209 $ command = $ application ->find ('sqlGenerator ' );
244210 $ commandTester = new \Symfony \Component \Console \Tester \CommandTester ($ command );
245211
246- $ this ->expectException (\CoolBeans \Exception \PrimaryKeyColumnDoesntExist ::class);
247- $ this ->expectExceptionMessage ('PrimaryKey attribute column(s) unknown doesn \' t exist in Bean InvalidBean. ' );
212+ $ this ->expectException (\CoolBeans \Exception \UnknownColumnInColumnArray ::class);
213+ $ this ->expectExceptionMessage ('Column [unknown] given in column array doesnt exist in Bean InvalidBean. ' );
248214
249215 $ commandTester ->execute ([
250216 'command ' => 'sqlGenerator ' ,
0 commit comments