Commit 41586439 authored by Crell's avatar Crell Committed by effulgentsia

Remove extraneous t() calls from assertion messages.

parent 66a24093
......@@ -58,12 +58,12 @@ public function testFilterRoutes() {
$routes = $matcher->matchRequestPartial(Request::create('path/one', 'GET'));
$this->assertEqual(count($routes->all()), 4, t('The correct number of routes was found.'));
$this->assertNotNull($routes->get('route_a'), t('The first matching route was found.'));
$this->assertNull($routes->get('route_b'), t('The non-matching route was not found.'));
$this->assertNotNull($routes->get('route_c'), t('The second matching route was found.'));
$this->assertNotNull($routes->get('route_d'), t('The all-matching route was found.'));
$this->assertNotNull($routes->get('route_e'), t('The multi-matching route was found.'));
$this->assertEqual(count($routes->all()), 4, 'The correct number of routes was found.');
$this->assertNotNull($routes->get('route_a'), 'The first matching route was found.');
$this->assertNull($routes->get('route_b'), 'The non-matching route was not found.');
$this->assertNotNull($routes->get('route_c'), 'The second matching route was found.');
$this->assertNotNull($routes->get('route_d'), 'The all-matching route was found.');
$this->assertNotNull($routes->get('route_e'), 'The multi-matching route was found.');
}
/**
......@@ -81,7 +81,7 @@ public function testNestedMatcher() {
$attributes = $matcher->matchRequest($request);
$this->assertEqual($attributes['_route'], 'route_a', t('The correct matching route was found.'));
$this->assertEqual($attributes['_route'], 'route_a', 'The correct matching route was found.');
}
/**
......@@ -101,7 +101,7 @@ public function testNoRouteFound() {
$this->fail(t('No exception was thrown.'));
}
catch (Exception $e) {
$this->assertTrue($e instanceof MethodNotAllowedException, t('The correct exception was thrown.'));
$this->assertTrue($e instanceof MethodNotAllowedException, 'The correct exception was thrown.');
}
}
......
......@@ -52,7 +52,7 @@ function testCreate() {
$dumper= new MatcherDumper($connection);
$class_name = 'Drupal\Core\Routing\MatcherDumper';
$this->assertTrue($dumper instanceof $class_name, t('Dumper created successfully'));
$this->assertTrue($dumper instanceof $class_name, 'Dumper created successfully');
}
/**
......@@ -72,7 +72,7 @@ function testAddRoutes() {
$collection_routes = $collection->all();
foreach ($dumper_routes as $name => $route) {
$this->assertEqual($route->getPattern(), $collection_routes[$name]->getPattern(), t('Routes match'));
$this->assertEqual($route->getPattern(), $collection_routes[$name]->getPattern(), 'Routes match');
}
}
......@@ -134,11 +134,11 @@ public function testDump() {
$loaded_route = unserialize($record->route);
$this->assertEqual($record->name, 'test_route', t('Dumped route has correct name.'));
$this->assertEqual($record->pattern, '/test/{my}/path', t('Dumped route has correct pattern.'));
$this->assertEqual($record->pattern_outline, '/test/%/path', t('Dumped route has correct pattern outline.'));
$this->assertEqual($record->fit, 5 /* 101 in binary */, t('Dumped route has correct fit.'));
$this->assertTrue($loaded_route instanceof Route, t('Route object retrieved successfully.'));
$this->assertEqual($record->name, 'test_route', 'Dumped route has correct name.');
$this->assertEqual($record->pattern, '/test/{my}/path', 'Dumped route has correct pattern.');
$this->assertEqual($record->pattern_outline, '/test/%/path', 'Dumped route has correct pattern outline.');
$this->assertEqual($record->fit, 5 /* 101 in binary */, 'Dumped route has correct fit.');
$this->assertTrue($loaded_route instanceof Route, 'Route object retrieved successfully.');
}
}
......@@ -63,7 +63,7 @@ public function testNestedMatcher() {
$attributes = $matcher->matchRequest($request);
$this->assertEqual($attributes['_route'], 'route_a', t('The correct matching route was found.'));
$this->assertEqual($attributes['_route'], 'route_a', 'The correct matching route was found.');
}
}
......@@ -67,11 +67,11 @@ public function testCandidateOutlines() {
$candidates = array_flip($candidates);
$this->assertTrue(count($candidates) == 4, t('Correct number of candidates found'));
$this->assertTrue(array_key_exists('/node/5/edit', $candidates), t('First candidate found.'));
$this->assertTrue(array_key_exists('/node/5/%', $candidates), t('Second candidate found.'));
$this->assertTrue(array_key_exists('/node/%/edit', $candidates), t('Third candidate found.'));
$this->assertTrue(array_key_exists('/node/%/%', $candidates), t('Fourth candidate found.'));
$this->assertTrue(count($candidates) == 4, 'Correct number of candidates found');
$this->assertTrue(array_key_exists('/node/5/edit', $candidates), 'First candidate found.');
$this->assertTrue(array_key_exists('/node/5/%', $candidates), 'Second candidate found.');
$this->assertTrue(array_key_exists('/node/%/edit', $candidates), 'Third candidate found.');
$this->assertTrue(array_key_exists('/node/%/%', $candidates), 'Fourth candidate found.');
}
/**
......@@ -94,7 +94,7 @@ function testExactPathMatch() {
$routes = $matcher->matchRequestPartial($request);
foreach ($routes as $route) {
$this->assertEqual($route->getPattern(), $path, t('Found path has correct pattern'));
$this->assertEqual($route->getPattern(), $path, 'Found path has correct pattern');
}
}
......@@ -119,12 +119,12 @@ function testOutlinePathMatch() {
// All of the matching paths have the correct pattern.
foreach ($routes as $route) {
$this->assertEqual($route->compile()->getPatternOutline(), '/path/%/one', t('Found path has correct pattern'));
$this->assertEqual($route->compile()->getPatternOutline(), '/path/%/one', 'Found path has correct pattern');
}
$this->assertEqual(count($routes->all()), 2, t('The correct number of routes was found.'));
$this->assertNotNull($routes->get('route_a'), t('The first matching route was found.'));
$this->assertNotNull($routes->get('route_b'), t('The second matching route was not found.'));
$this->assertEqual(count($routes->all()), 2, 'The correct number of routes was found.');
$this->assertNotNull($routes->get('route_a'), 'The first matching route was found.');
$this->assertNotNull($routes->get('route_b'), 'The second matching route was not found.');
}
/**
......@@ -149,7 +149,7 @@ function testOutlinePathNoMatch() {
$this->fail(t('No exception was thrown.'));
}
catch (Exception $e) {
$this->assertTrue($e instanceof ResourceNotFoundException, t('The correct exception was thrown.'));
$this->assertTrue($e instanceof ResourceNotFoundException, 'The correct exception was thrown.');
}
}
......
......@@ -33,9 +33,9 @@ public function testCompilation() {
$route->setOption('compiler_class', 'Drupal\Core\Routing\RouteCompiler');
$compiled = $route->compile();
$this->assertEqual($route, $compiled->getRoute(), t('Compiled route has the correct route object.'));
$this->assertEqual($compiled->getFit(), 5 /* That's 101 binary*/, t('The fit was correct.'));
$this->assertEqual($compiled->getPatternOutline(), '/test/%/more', t('The pattern outline was correct.'));
$this->assertEqual($route, $compiled->getRoute(), 'Compiled route has the correct route object.');
$this->assertEqual($compiled->getFit(), 5 /* That's 101 binary*/, 'The fit was correct.');
$this->assertEqual($compiled->getPatternOutline(), '/test/%/more', 'The pattern outline was correct.');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment