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 @@ -1086,7 +1086,7 @@ public function filter($value)
10861086 if ($ this ->_appState ->getMode () == \Magento \Framework \App \State::MODE_DEVELOPER ) {
10871087 $ value = sprintf (__ ('Error filtering template: %s ' ), $ e ->getMessage ());
10881088 } else {
1089- $ value = __ ("We're sorry, an error has occurred while generating this content. " );
1089+ $ value = ( string ) __ ("We're sorry, an error has occurred while generating this content. " );
10901090 }
10911091 $ this ->_logger ->critical ($ e );
10921092 }
Original file line number Diff line number Diff line change @@ -271,6 +271,16 @@ protected function getModel($mockedMethods = null)
271271 ->getMock ();
272272 }
273273
274+ /**
275+ * Test exception handling of filter method
276+ */
277+ public function testFilterExceptionHandler ()
278+ {
279+ $ filter = $ this ->getModel ();
280+ $ filteredValue = $ filter ->filter (null );
281+ $ this ->assertTrue (is_string ($ filteredValue ));
282+ }
283+
274284 /**
275285 * Test basic usages of applyInlineCss
276286 *
You can’t perform that action at this time.
0 commit comments