You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->fail('->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
227
+
} catch (\Exception$e) {
228
+
$this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
229
+
$this->assertRegExp('/Did you mean this/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
230
+
}
231
+
232
+
// Namespace + singular
233
+
try {
234
+
$application->find('foO:bar');
235
+
$this->fail('->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
236
+
} catch (\Exception$e) {
237
+
$this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
238
+
$this->assertRegExp('/Did you mean this/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with one alternative');
239
+
}
240
+
241
+
242
+
$application->add(new \Foo1Command());
243
+
$application->add(new \Foo2Command());
244
+
245
+
// Command + plural
246
+
try {
247
+
$application->find('foo:baR');
248
+
$this->fail('->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
249
+
} catch (\Exception$e) {
250
+
$this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
251
+
$this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
252
+
}
253
+
254
+
// Namespace + plural
255
+
try {
256
+
$application->find('foo2:bar');
257
+
$this->fail('->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
258
+
} catch (\Exception$e) {
259
+
$this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
260
+
$this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives');
0 commit comments