Reorganized tests file structure
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
|
@ -10,7 +10,7 @@ class TestSupport
|
||||||
|
|
||||||
public function getPath($assetName)
|
public function getPath($assetName)
|
||||||
{
|
{
|
||||||
return getConfig()->rootDir . DS . 'tests' . DS . 'TestFiles' . DS . $assetName;
|
return TextHelper::absolutePath(getConfig()->rootDir . DS . 'tests' . DS . 'Files' . DS . $assetName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assertTagNames($post, $tags)
|
public function assertTagNames($post, $tags)
|
|
@ -5,12 +5,12 @@ class ListLogsJobTest extends AbstractTest
|
||||||
{
|
{
|
||||||
$this->grantAccess('listLogs');
|
$this->grantAccess('listLogs');
|
||||||
|
|
||||||
getConfig()->main->logsPath = dirname(__DIR__) . '/logs/test1.log';
|
getConfig()->main->logsPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/test1.log');
|
||||||
Logger::init();
|
Logger::init();
|
||||||
|
|
||||||
Logger::log('nonsense');
|
Logger::log('nonsense');
|
||||||
|
|
||||||
getConfig()->main->logsPath = dirname(__DIR__) . '/logs/test2.log';
|
getConfig()->main->logsPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/test2.log');
|
||||||
Logger::init();
|
Logger::init();
|
||||||
|
|
||||||
Logger::log('nonsense');
|
Logger::log('nonsense');
|
|
@ -26,8 +26,8 @@ class LoggerTest extends AbstractTest
|
||||||
|
|
||||||
public function testPathChanging()
|
public function testPathChanging()
|
||||||
{
|
{
|
||||||
$logPath = dirname(__DIR__) . '/logs/{yyyy}-{mm}-{dd}.log';
|
$logPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/{yyyy}-{mm}-{dd}.log');
|
||||||
$realLogPath = dirname(__DIR__) . '/logs/' . date('Y-m-d') . '.log';
|
$realLogPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/' . date('Y-m-d') . '.log');
|
||||||
|
|
||||||
getConfig()->main->logsPath = $logPath;
|
getConfig()->main->logsPath = $logPath;
|
||||||
$this->assert->doesNotThrow(function()
|
$this->assert->doesNotThrow(function()
|