@@ -75,13 +74,13 @@ public function assertFileHookCalled($hook, $expected_count = 1, $message = NULL
...
@@ -75,13 +74,13 @@ public function assertFileHookCalled($hook, $expected_count = 1, $message = NULL
if(!isset($message)){
if(!isset($message)){
if($actual_count==$expected_count){
if($actual_count==$expected_count){
$message=newFormattableMarkup('hook_file_@name was called correctly.',['@name'=>$hook]);
$message="hook_file_$hook was called correctly.";
}
}
elseif($expected_count==0){
elseif($expected_count==0){
$message=\Drupal::translation()->formatPlural($actual_count,'hook_file_@name was not expected to be called but was actually called once.','hook_file_@name was not expected to be called but was actually called @count times.',['@name'=>$hook,'@count'=>$actual_count]);
$message="hook_file_$hook was not expected to be called but was actually called $actual_count time(s).";
}
}
else{
else{
$message=newFormattableMarkup('hook_file_@name was expected to be called %expected times but was called %actual times.',['@name'=>$hook,'%expected'=>$expected_count,'%actual'=>$actual_count]);
$message="hook_file_$hook was expected to be called $expected_count time(s) but was called $actual_count time(s).";
@@ -88,16 +87,16 @@ public function assertFileHookCalled($hook, $expected_count = 1, $message = NULL
...
@@ -88,16 +87,16 @@ public function assertFileHookCalled($hook, $expected_count = 1, $message = NULL
if(!isset($message)){
if(!isset($message)){
if($actual_count==$expected_count){
if($actual_count==$expected_count){
$message=newFormattableMarkup('hook_file_@name was called correctly.',['@name'=>$hook]);
$message="hook_file_$hook was called correctly.";
}
}
elseif($expected_count==0){
elseif($expected_count==0){
$message=\Drupal::translation()->formatPlural($actual_count,'hook_file_@name was not expected to be called but was actually called once.','hook_file_@name was not expected to be called but was actually called @count times.',['@name'=>$hook,'@count'=>$actual_count]);
$message="hook_file_$hook was not expected to be called but was actually called $actual_count time(s).";
}
}
else{
else{
$message=newFormattableMarkup('hook_file_@name was expected to be called %expected times but was called %actual times.',['@name'=>$hook,'%expected'=>$expected_count,'%actual'=>$actual_count]);
$message="hook_file_$hook was expected to be called $expected_count time(s) but was called $actual_count time(s).";