1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 21:26:43 +02:00

Split expectException calls with two parameters into the proper two calls

This commit is contained in:
Chris Forrence
2017-03-21 10:29:05 -04:00
parent 85250d3c72
commit 763c3afb32
2 changed files with 6 additions and 3 deletions

View File

@@ -115,7 +115,8 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormatToStringExceptionHandle()
{
$formatter = new NormalizerFormatter('Y-m-d');
$this->expectException('RuntimeException', 'Could not convert to string');
$this->expectException('RuntimeException');
$this->expectExceptionMessage('Could not convert to string');
$formatter->format([
'myObject' => new TestToStringError(),
]);
@@ -313,7 +314,8 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
$reflMethod = new \ReflectionMethod($formatter, 'handleJsonError');
$reflMethod->setAccessible(true);
$this->expectException('RuntimeException', $msg);
$this->expectException('RuntimeException');
$this->expectExceptionMessage($msg);
$reflMethod->invoke($formatter, $code, 'faked');
}

View File

@@ -134,7 +134,8 @@ class ElasticSearchHandlerTest extends TestCase
$handler = new ElasticSearchHandler($client, $handlerOpts);
if ($expectedError) {
$this->expectException($expectedError[0], $expectedError[1]);
$this->expectException($expectedError[0]);
$this->expectExceptionMessage($expectedError[1]);
$handler->handle($this->getRecord());
} else {
$this->assertFalse($handler->handle($this->getRecord()));