File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1102,7 +1102,7 @@ public function filter($value)
1102
1102
if ($ this ->_appState ->getMode () == State::MODE_DEVELOPER ) {
1103
1103
$ value = sprintf (__ ('Error filtering template: %s ' ), $ e ->getMessage ());
1104
1104
} else {
1105
- $ value = __ ("We're sorry, an error has occurred while generating this content. " );
1105
+ $ value = ( string ) __ ("We're sorry, an error has occurred while generating this content. " );
1106
1106
}
1107
1107
$ this ->_logger ->critical ($ e );
1108
1108
}
Original file line number Diff line number Diff line change @@ -267,6 +267,16 @@ protected function getModel($mockedMethods = null)
267
267
->getMock ();
268
268
}
269
269
270
+ /**
271
+ * Test exception handling of filter method
272
+ */
273
+ public function testFilterExceptionHandler ()
274
+ {
275
+ $ filter = $ this ->getModel ();
276
+ $ filteredValue = $ filter ->filter (null );
277
+ $ this ->assertTrue (is_string ($ filteredValue ));
278
+ }
279
+
270
280
/**
271
281
* Test basic usages of applyInlineCss
272
282
*
You can’t perform that action at this time.
0 commit comments