Phalcon\Test\Unit\Logger\Adapter\FileTest::numberOfMessagesLogged PHP Method

numberOfMessagesLogged() protected method

Runs the test for how many lines the file has on creation
Since: 2014-09-13
Author: Nikos Dimopoulos ([email protected])
protected numberOfMessagesLogged ( string $function )
$function string
    protected function numberOfMessagesLogged($function)
    {
        $I = $this->tester;
        $fileName = $I->getNewFileName('log', 'log');
        $logger = new File($this->logPath . $fileName);
        $logger->{$function}('Hello');
        $logger->{$function}('Goodbye');
        $logger->close();
        $I->amInPath($this->logPath);
        $I->openFile($fileName);
        $I->seeNumberNewLines(3);
        $I->deleteFile($fileName);
    }
FileTest