Parse Throwable message to proper format.
public static parseThrowableMessage ( string[] $ex ) : string | ||
$ex | string[] | |
return | string |
/** * */ public function testStaticApiParseThrowableMessage_ParsesThrowableMessage_ForException() { $prev = $this->createException('Previous'); $ex = $this->createException($message = 'Exception', $prev); $stack = Throwable::getThrowableStack($ex); $base = $this->callProtectedMethod(Throwable::class, 'getBasename', [get_class($ex)]); $this->assertRegExp("#\\[{$base}\\] \"{$message}\" in ThrowableTest:([0-9]*?)#si", Throwable::parseThrowableMessage($stack)); }