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

make compatible to phpunit 6

This commit is contained in:
DQNEO
2018-04-02 00:54:21 +09:00
parent a3388569cd
commit 39f464bd58
6 changed files with 18 additions and 10 deletions

View File

@@ -134,7 +134,8 @@ class RotatingFileHandlerTest extends TestCase
{
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2);
if (!$valid) {
$this->setExpectedExceptionRegExp(InvalidArgumentException::class, '~^Invalid date format~');
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('~^Invalid date format~');
}
$handler->setFilenameFormat('{filename}-{date}', $dateFormat);
$this->assertTrue(true);
@@ -174,7 +175,8 @@ class RotatingFileHandlerTest extends TestCase
{
$handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2);
if (!$valid) {
$this->setExpectedExceptionRegExp(InvalidArgumentException::class, '~^Invalid filename format~');
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('~^Invalid filename format~');
}
$handler->setFilenameFormat($filenameFormat, RotatingFileHandler::FILE_PER_DAY);