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)
11021102 if ($ this ->_appState ->getMode () == State::MODE_DEVELOPER ) {
11031103 $ value = sprintf (__ ('Error filtering template: %s ' ), $ e ->getMessage ());
11041104 } 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. " );
11061106 }
11071107 $ this ->_logger ->critical ($ e );
11081108 }
Original file line number Diff line number Diff line change @@ -267,6 +267,16 @@ protected function getModel($mockedMethods = null)
267267 ->getMock ();
268268 }
269269
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+
270280 /**
271281 * Test basic usages of applyInlineCss
272282 *
You can’t perform that action at this time.
0 commit comments