diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-05 23:53:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-08-05 23:53:39 +0000 |
commit | 25171a17f626695ecf984cc44b60d3eae1310b4c (patch) | |
tree | 3268ef89294cbb96d0875d665012c4ff16d8c68a /modules/simpletest/tests/graph.test | |
parent | cacd044a6398df92de68c5aea31987ac0fff507a (diff) | |
download | brdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.gz brdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.bz2 |
Reverting #500866. Needs more discussion.
Diffstat (limited to 'modules/simpletest/tests/graph.test')
-rw-r--r-- | modules/simpletest/tests/graph.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/simpletest/tests/graph.test b/modules/simpletest/tests/graph.test index aad60f81d..70af3ff1e 100644 --- a/modules/simpletest/tests/graph.test +++ b/modules/simpletest/tests/graph.test @@ -68,7 +68,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]), 'Vertex 6 has not been created'); + $this->assertFALSE(isset($graph[6]), t('Vertex 6 has not been created')); $expected_components = array( array(1, 2, 3, 4, 5, 7), @@ -114,7 +114,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, 'Expected paths for vertex ' . $vertex . ': ' . $this->displayArray($expected, TRUE) . ', got ' . $this->displayArray($result, TRUE)); + $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)))); } } @@ -132,7 +132,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, 'Expected reverse paths for vertex ' . $vertex . ': ' . $this->displayArray($expected, TRUE) . ', got ' . $this->displayArray($result, TRUE)); + $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)))); } } @@ -152,9 +152,9 @@ class GraphUnitTest extends DrupalUnitTestCase { $result_components[] = $graph[$vertex]['component']; unset($unassigned_vertices[$vertex]); } - $this->assertEqual(1, count(array_unique($result_components)), 'Expected one unique component for vertices ' . $this->displayArray($component) . ', got ' . $this->displayArray($result_components)); + $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(array(), $unassigned_vertices, 'Vertices not assigned to a component: ' . $this->displayArray($unassigned_vertices, TRUE)); + $this->assertEqual(array(), $unassigned_vertices, t('Vertices not assigned to a component: @vertices', array('@vertices' => $this->displayArray($unassigned_vertices, TRUE)))); } /** @@ -169,7 +169,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'], 'Weights of ' . $previous_vertex . ' and ' . $vertex . ' are correct relative to each other'); + $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))); } } } |