forked from SeasX/seas-logger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace Seasx\SeasLogger\Tests; | ||
|
||
use Seasx\SeasLogger\Logger; | ||
|
||
class LoggerTest extends TestCase | ||
{ | ||
/** | ||
* @return Logger | ||
*/ | ||
public function init () { | ||
return new Logger(); | ||
} | ||
|
||
public function testEmergency() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->emergency('[SeasLog Test]', ['level' => 'emergency']); | ||
} | ||
|
||
public function testAlert() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->alert('[SeasLog Test]', ['level' => 'alert']); | ||
} | ||
|
||
public function testCritical() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->critical('[SeasLog Test]', ['level' => 'critical']); | ||
} | ||
|
||
public function testError() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->critical('[SeasLog Test]', ['level' => 'error']); | ||
} | ||
|
||
public function testWarning() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->warning('[SeasLog Test]', ['level' => 'warning']); | ||
} | ||
|
||
public function testNotice() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->notice('[SeasLog Test]', ['level' => 'notice']); | ||
} | ||
|
||
public function testInfo() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->info('[SeasLog Test]', ['level' => 'info']); | ||
} | ||
|
||
public function testDebug() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->debug('[SeasLog Test]', ['level' => 'debug']); | ||
} | ||
|
||
public function testLog() { | ||
$logger = $this->init(); | ||
$this->assertInstanceOf(Logger::class, $logger); | ||
$logger->log('debug','[SeasLog Test]', ['level' => 'log']); | ||
} | ||
} |