diff --git a/core/lib/Thelia/Tests/Routing/Matcher/ActionMatcherTest.php b/core/lib/Thelia/Tests/Routing/Matcher/ActionMatcherTest.php new file mode 100644 index 000000000..68e74f11c --- /dev/null +++ b/core/lib/Thelia/Tests/Routing/Matcher/ActionMatcherTest.php @@ -0,0 +1,50 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Tests\Routing\Matcher; + +use Symfony\Component\HttpFoundation\Request; +use Thelia\Routing\Matcher\ActionMatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Thelia\Core\Event\ActionEvent; + +class ActionMatcherTest extends \PHPUnit_Framework_TestCase +{ + + /** + * @expectedException Symfony\Component\Routing\Exception\ResourceNotFoundException + */ + public function testDispatchActionWithoutAction() + { + $actionMatcher = new ActionMatcher(); + $request = new Request(); + + $dispatcher = $this->getMock("Symfony\Component\EventDispatcher\EventDispatcherInterface"); + + $dispatcher->expects($this->any()) + ->method("dispatch"); + $actionMatcher->setDispatcher($dispatcher); + $actionMatcher->matchRequest($request); + } + +} \ No newline at end of file