$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_ordersas$order){
$previous_vertex=array_shift($order);
foreach($orderas$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)));
@@ -55,19 +55,19 @@ class ImageToolkitTestCase extends DrupalWebTestCase {
// Determine if there were any expected that were not called.
$uncalled=array_diff($expected,$actual);
if(count($uncalled)){
$this->assertTrue(FALSE,t('Expected operations %expected to be called but %uncalled was not called.',array('%expected'=>implode(', ',$expected),'%uncalled'=>implode(', ',$uncalled))));
$this->assertTrue(FALSE,format_string('Expected operations %expected to be called but %uncalled was not called.',array('%expected'=>implode(', ',$expected),'%uncalled'=>implode(', ',$uncalled))));
}
else{
$this->assertTrue(TRUE,t('All the expected operations were called: %expected',array('%expected'=>implode(', ',$expected))));
$this->assertTrue(TRUE,format_string('All the expected operations were called: %expected',array('%expected'=>implode(', ',$expected))));
}
// Determine if there were any unexpected calls.
$unexpected=array_diff($actual,$expected);
if(count($unexpected)){
$this->assertTrue(FALSE,t('Unexpected operations were called: %unexpected.',array('%unexpected'=>implode(', ',$unexpected))));
$this->assertTrue(FALSE,format_string('Unexpected operations were called: %unexpected.',array('%unexpected'=>implode(', ',$unexpected))));
}
else{
$this->assertTrue(TRUE,t('No unexpected operations were called.'));
$this->assertTrue(TRUE,'No unexpected operations were called.');
}
}
}
...
...
@@ -90,8 +90,8 @@ class ImageToolkitUnitTest extends ImageToolkitTestCase {
*/
functiontestGetAvailableToolkits(){
$toolkits=image_get_available_toolkits();
$this->assertTrue(isset($toolkits['test']),t('The working toolkit was returned.'));
$this->assertFalse(isset($toolkits['broken']),t('The toolkit marked unavailable was not returned'));
$this->assertTrue(isset($toolkits['test']),'The working toolkit was returned.');
$this->assertFalse(isset($toolkits['broken']),'The toolkit marked unavailable was not returned');
$this->assertToolkitOperationsCalled(array());
}
...
...
@@ -100,8 +100,8 @@ class ImageToolkitUnitTest extends ImageToolkitTestCase {
*/
functiontestLoad(){
$image=image_load($this->file,$this->toolkit);
$this->assertTrue(is_object($image),t('Returned an object.'));
$this->assertEqual($this->toolkit,$image->toolkit,t('Image had toolkit set.'));
$this->assertTrue(is_object($image),'Returned an object.');
$this->assertEqual($this->toolkit,$image->toolkit,'Image had toolkit set.');
$this->assertTrue($correct_dimensions_real,t('Image %file after %action action has proper dimensions.',array('%file'=>$file,'%action'=>$op)));
$this->assertTrue($correct_dimensions_object,t('Image %file object after %action action is reporting the proper height and width values.',array('%file'=>$file,'%action'=>$op)));
$this->assertTrue($correct_dimensions_real,format_string('Image %file after %action action has proper dimensions.',array('%file'=>$file,'%action'=>$op)));
$this->assertTrue($correct_dimensions_object,format_string('Image %file object after %action action is reporting the proper height and width values.',array('%file'=>$file,'%action'=>$op)));
// JPEG colors will always be messed up due to compression.
if($image->info['extension']!='jpg'){
$this->assertTrue($correct_colors,t('Image %file object after %action action has the correct color placement.',array('%file'=>$file,'%action'=>$op)));
$this->assertTrue($correct_colors,format_string('Image %file object after %action action has the correct color placement.',array('%file'=>$file,'%action'=>$op)));