PopTest\Log\LogTest::testWriterDb PHP Method

testWriterDb() public method

public testWriterDb ( )
    public function testWriterDb()
    {
        $w = new Db(new Logs());
        $this->assertInstanceOf('Pop\\Log\\Writer\\Db', $w);
        $l = new Logger($w);
        $l->debug('Test log message');
        $entries = Logs::findAll();
        $this->assertEquals(1, count($entries->rows));
        foreach ($entries->rows as $row) {
            $e = Logs::findById($row->id);
            if (isset($e->id)) {
                $e->delete();
            }
        }
    }