Skip to content
Extraits de code Groupes Projets
Valider 41e00a69 rédigé par Okhin's avatar Okhin
Parcourir les fichiers

Fixed the generic object test

parent ddaa1b20
Aucune branche associée trouvée
Aucune étiquette associée trouvée
3 requêtes de fusion!37Mise en production,!13Resolve "La structure des piplomes à changer, le Finder n'est plus fonctionnels.",!8WIP: Resolve "Améliorer et ajouter des tests"
......@@ -19,7 +19,11 @@ class CommandHandler
*/
public function handle($command)
{
$method = $this->getHandleMethod($command);
try {
$method = $this->getHandleMethod($command);
} catch (Exception $e) {
throw new CommandNotHandledException();
}
foreach ($this->handlers as $handler) {
if (method_exists($handler, $method)) {
......
......@@ -16,7 +16,7 @@ class CommandHandlerTest extends Functionaltest
public function testCommandNotHandledException()
{
$this->setExpectedException('LQDN\Exception\CommandNotHandledException');
$this->container['command_handler']->handle(new Object());
$this->container['command_handler']->handle(new class{});
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter