Skip to content

Commit

Permalink
added missing test for MissingRouteLocaleException
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Jul 10, 2016
1 parent 66665e8 commit d5209be
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Fixtures/Controller/MissingLocalesController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace BeSimple\I18nRoutingBundle\Tests\Fixtures\Controller;

use BeSimple\I18nRoutingBundle\Routing\Annotation\I18nRoute;

class MissingLocalesController
{
/**
* @I18nRoute(name="foo")
*/
public function fooAction()
{
}
}
11 changes: 11 additions & 0 deletions tests/Routing/Loader/AnnotatedRouteControllerLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,15 @@ public function testRoutesMissingPrefixLocale()

$loader->load('BeSimple\I18nRoutingBundle\Tests\Fixtures\Controller\MissingPrefixedLocalesController');
}

/**
* @expectedException \BeSimple\I18nRoutingBundle\Routing\Exception\MissingRouteLocaleException
*/
public function testRoutesMissingLocales()
{
$loader = new AnnotatedRouteControllerLoader(new AnnotationReader());
AnnotationRegistry::registerLoader('class_exists');

$loader->load('BeSimple\I18nRoutingBundle\Tests\Fixtures\Controller\MissingLocalesController');
}
}

0 comments on commit d5209be

Please sign in to comment.