Longman\TelegramBot\Tests\Unit\TelegramLogTest::testErrorStream PHP Method

testErrorStream() public method

public testErrorStream ( )
    public function testErrorStream()
    {
        $file = $this->logfiles['error'];
        $this->assertFileNotExists($file);
        TelegramLog::initErrorLog($file);
        TelegramLog::error('my error');
        $this->assertFileExists($file);
        $this->assertContains('bot_log.ERROR: my error', file_get_contents($file));
    }