From 8f2fa6b047243ed6424e805ee767b6c15eca8fc9 Mon Sep 17 00:00:00 2001 From: GDIBass Date: Fri, 25 Aug 2017 11:25:19 -0700 Subject: [PATCH] changed exception message --- src/Symfony/Component/Workflow/EventListener/GuardListener.php | 2 +- .../Workflow/Exception/InvalidTokenConfigurationException.php | 2 +- .../Workflow/Tests/EventListener/GuardListenerTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Workflow/EventListener/GuardListener.php b/src/Symfony/Component/Workflow/EventListener/GuardListener.php index 5d10cbcfce..8726e4bddc 100644 --- a/src/Symfony/Component/Workflow/EventListener/GuardListener.php +++ b/src/Symfony/Component/Workflow/EventListener/GuardListener.php @@ -57,7 +57,7 @@ class GuardListener $token = $this->tokenStorage->getToken(); if (null === $token) { - throw new InvalidTokenConfigurationException('No token is set'); + throw new InvalidTokenConfigurationException(sprintf('There are no token available for workflow %s', $event->getWorkflowName())); } if (null !== $this->roleHierarchy) { diff --git a/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php b/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php index 681d7a8bba..85ada5e780 100644 --- a/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php +++ b/src/Symfony/Component/Workflow/Exception/InvalidTokenConfigurationException.php @@ -18,4 +18,4 @@ namespace Symfony\Component\Workflow\Exception; */ class InvalidTokenConfigurationException extends LogicException implements ExceptionInterface { -} +} \ No newline at end of file diff --git a/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php b/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php index c32aec06a4..0e2dbc13bc 100644 --- a/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php +++ b/src/Symfony/Component/Workflow/Tests/EventListener/GuardListenerTest.php @@ -71,7 +71,7 @@ class GuardListenerTest extends TestCase /** * @expectedException \Symfony\Component\Workflow\Exception\InvalidTokenConfigurationException - * @expectedExceptionMessage No token is set + * @expectedExceptionMessage There are no token available for workflow unnamed */ public function testWithNoTokenStorage() {