commit 686e82578a07574d4f192d4730e5254982d4a165 Author: Klaus Purer Date: Wed Nov 21 14:50:00 2012 +0100 Fixed partial media type matcher simpletests. diff --git a/core/modules/system/lib/Drupal/system/Tests/Routing/MimeTypeMatcherTest.php b/core/modules/system/lib/Drupal/system/Tests/Routing/MimeTypeMatcherTest.php index 850cc7e..7e6c497 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Routing/MimeTypeMatcherTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Routing/MimeTypeMatcherTest.php @@ -8,17 +8,13 @@ namespace Drupal\system\Tests\Routing; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Route; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Symfony\Component\HttpKernel\Exception\HttpException; use Drupal\simpletest\UnitTestBase; use Drupal\Core\Routing\MimeTypeMatcher; use Drupal\Core\Routing\NestedMatcher; use Drupal\Core\Routing\FirstEntryFinalMatcher; -use Exception; - /** * Basic tests for the MimeTypeMatcher class. */ @@ -117,8 +113,8 @@ public function testNoRouteFound() { $routes = $matcher->matchRequestPartial($request); $this->fail(t('No exception was thrown.')); } - catch (Exception $e) { - $this->assertTrue($e instanceof RouteNotFoundException, 'The correct exception was thrown.'); + catch (HttpException $e) { + $this->assertEqual($e->getStatusCode(), 415, 'The correct status code exception was thrown.'); } }