changed exception message

This commit is contained in:
GDIBass 2017-08-25 11:25:19 -07:00
parent 49839e3c28
commit 8f2fa6b047
3 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -18,4 +18,4 @@ namespace Symfony\Component\Workflow\Exception;
*/
class InvalidTokenConfigurationException extends LogicException implements ExceptionInterface
{
}
}

View File

@ -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()
{