From dcd81db201c4e2d9d80f9b338fdad279a38e0968 Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon Date: Fri, 26 Apr 2013 08:59:35 -0700 Subject: Issue #1797410 by dcam, izus, Lars Toomre: Remove t() from test asserts in misc system tests --- modules/simpletest/tests/graph.test | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/simpletest/tests/graph.test') diff --git a/modules/simpletest/tests/graph.test b/modules/simpletest/tests/graph.test index c190161b4..691744ef3 100644 --- a/modules/simpletest/tests/graph.test +++ b/modules/simpletest/tests/graph.test @@ -69,7 +69,7 @@ class GraphUnitTest extends DrupalUnitTestCase { $this->assertReversePaths($graph, $expected_reverse_paths); // Assert that DFS didn't created "missing" vertexes automatically. - $this->assertFALSE(isset($graph[6]), t('Vertex 6 has not been created')); + $this->assertFALSE(isset($graph[6]), 'Vertex 6 has not been created'); $expected_components = array( array(1, 2, 3, 4, 5, 7), @@ -115,7 +115,7 @@ class GraphUnitTest extends DrupalUnitTestCase { // Build an array with keys = $paths and values = TRUE. $expected = array_fill_keys($paths, TRUE); $result = isset($graph[$vertex]['paths']) ? $graph[$vertex]['paths'] : array(); - $this->assertEqual($expected, $result, t('Expected paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE)))); + $this->assertEqual($expected, $result, format_string('Expected paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE)))); } } @@ -133,7 +133,7 @@ class GraphUnitTest extends DrupalUnitTestCase { // Build an array with keys = $paths and values = TRUE. $expected = array_fill_keys($paths, TRUE); $result = isset($graph[$vertex]['reverse_paths']) ? $graph[$vertex]['reverse_paths'] : array(); - $this->assertEqual($expected, $result, t('Expected reverse paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE)))); + $this->assertEqual($expected, $result, format_string('Expected reverse paths for vertex @vertex: @expected-paths, got @paths', array('@vertex' => $vertex, '@expected-paths' => $this->displayArray($expected, TRUE), '@paths' => $this->displayArray($result, TRUE)))); } } @@ -153,9 +153,9 @@ class GraphUnitTest extends DrupalUnitTestCase { $result_components[] = $graph[$vertex]['component']; unset($unassigned_vertices[$vertex]); } - $this->assertEqual(1, count(array_unique($result_components)), t('Expected one unique component for vertices @vertices, got @components', array('@vertices' => $this->displayArray($component), '@components' => $this->displayArray($result_components)))); + $this->assertEqual(1, count(array_unique($result_components)), format_string('Expected one unique component for vertices @vertices, got @components', array('@vertices' => $this->displayArray($component), '@components' => $this->displayArray($result_components)))); } - $this->assertEqual(array(), $unassigned_vertices, t('Vertices not assigned to a component: @vertices', array('@vertices' => $this->displayArray($unassigned_vertices, TRUE)))); + $this->assertEqual(array(), $unassigned_vertices, format_string('Vertices not assigned to a component: @vertices', array('@vertices' => $this->displayArray($unassigned_vertices, TRUE)))); } /** @@ -170,7 +170,7 @@ class GraphUnitTest extends DrupalUnitTestCase { foreach ($expected_orders as $order) { $previous_vertex = array_shift($order); foreach ($order as $vertex) { - $this->assertTrue($graph[$previous_vertex]['weight'] < $graph[$vertex]['weight'], t('Weights of @previous-vertex and @vertex are correct relative to each other', array('@previous-vertex' => $previous_vertex, '@vertex' => $vertex))); + $this->assertTrue($graph[$previous_vertex]['weight'] < $graph[$vertex]['weight'], format_string('Weights of @previous-vertex and @vertex are correct relative to each other', array('@previous-vertex' => $previous_vertex, '@vertex' => $vertex))); } } } -- cgit v1.2.3