Skip to content

Commit

Permalink
Update: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Player626 committed Jul 27, 2021
1 parent bca476d commit 9ac87fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function runTest()

function testTempDir()
{
$this->assertEquals(EASYSWOOLE_ROOT.'/Temp',EASYSWOOLE_TEMP_DIR);
$this->assertEquals(EASYSWOOLE_ROOT . '/Temp', EASYSWOOLE_TEMP_DIR);
}

}
7 changes: 2 additions & 5 deletions tests/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use EasySwoole\Component\Di;
use EasySwoole\Component\Event;
use EasySwoole\EasySwoole\Core;
use EasySwoole\EasySwoole\Logger;
use EasySwoole\EasySwoole\SysConst;
use EasySwoole\Log\LoggerInterface;
Expand All @@ -22,16 +23,12 @@ class LoggerTest extends TestCase

public function runTest()
{
Core::getInstance()->initialize();
$logger = Di::getInstance()->get(SysConst::LOGGER_HANDLER);
$this->logger = Logger::getInstance($logger);
return parent::runTest(); // TODO: Change the autogenerated stub
}

public function testSetLogConsole()
{
$this->assertInstanceOf(LoggerInterface::class, $this->logger->setLogConsole(true));
}

public function testOnLog()
{
$this->assertInstanceOf(Event::class, $this->logger->onLog());
Expand Down

0 comments on commit 9ac87fc

Please sign in to comment.