diff options
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Log/LoggerTest.php')
| -rw-r--r-- | vendor/symfony/http-kernel/Tests/Log/LoggerTest.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php index 3a5a8ade54..79b79cc69c 100644 --- a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php +++ b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php @@ -32,13 +32,13 @@ class LoggerTest extends TestCase */ private $tmpFile; - protected function setUp() + protected function setUp(): void { $this->tmpFile = tempnam(sys_get_temp_dir(), 'log'); $this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile); } - protected function tearDown() + protected function tearDown(): void { if (!@unlink($this->tmpFile)) { file_put_contents($this->tmpFile, ''); @@ -107,27 +107,21 @@ class LoggerTest extends TestCase $this->assertSame([], $this->getLogs()); } - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ public function testThrowsOnInvalidLevel() { + $this->expectException('Psr\Log\InvalidArgumentException'); $this->logger->log('invalid level', 'Foo'); } - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ public function testThrowsOnInvalidMinLevel() { + $this->expectException('Psr\Log\InvalidArgumentException'); new Logger('invalid'); } - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ public function testInvalidOutput() { + $this->expectException('Psr\Log\InvalidArgumentException'); new Logger(LogLevel::DEBUG, '/'); } @@ -145,7 +139,7 @@ class LoggerTest extends TestCase if (method_exists($this, 'createPartialMock')) { $dummy = $this->createPartialMock(DummyTest::class, ['__toString']); } else { - $dummy = $this->getMock(DummyTest::class, ['__toString']); + $dummy = $this->createPartialMock(DummyTest::class, ['__toString']); } $dummy->expects($this->atLeastOnce()) ->method('__toString') |
