ClassThatInheritLogger example

$logger->reset();

        $this->assertEmpty($logger->getLogs());
        $this->assertSame(0, $logger->countErrors());
        if (class_exists(ResettableInterface::class)) {
            $this->assertEmpty($handler->getRecords());
        }
    }

    public function testInheritedClassCallGetLogsWithoutArgument()
    {
        $loggerChild = new ClassThatInheritLogger('test');
        $this->assertSame([]$loggerChild->getLogs());
    }

    public function testInheritedClassCallCountErrorsWithoutArgument()
    {
        $loggerChild = new ClassThatInheritLogger('test');
        $this->assertEquals(0, $loggerChild->countErrors());
    }
}
Home | Imprint | This part of the site doesn't use cookies.