1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-19 15:49:19 +02:00

Upgrade PHPUnit to v8

This commit is contained in:
Mario Blažek
2019-08-12 15:20:00 +02:00
parent 2e3c369667
commit 37900f9268
46 changed files with 154 additions and 166 deletions

View File

@@ -11,18 +11,13 @@
namespace Monolog\Formatter;
use PHPUnit\Framework\TestCase;
/**
* @covers Monolog\Formatter\NormalizerFormatter
*/
class NormalizerFormatterTest extends \PHPUnit\Framework\TestCase
class NormalizerFormatterTest extends TestCase
{
public function tearDown()
{
\PHPUnit\Framework\Error\Warning::$enabled = true;
return parent::tearDown();
}
public function testFormat()
{
$formatter = new NormalizerFormatter('Y-m-d');
@@ -263,11 +258,10 @@ class NormalizerFormatterTest extends \PHPUnit\Framework\TestCase
$this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']);
}
/**
* @expectedException RuntimeException
*/
public function testThrowsOnInvalidEncoding()
{
$this->expectException(\RuntimeException::class);
$formatter = new NormalizerFormatter();
$reflMethod = new \ReflectionMethod($formatter, 'toJson');
$reflMethod->setAccessible(true);