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)
|
||||
{
|
||||
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)
|
|
@ -5,12 +5,12 @@ class ListLogsJobTest extends AbstractTest
|
|||
{
|
||||
$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::log('nonsense');
|
||||
|
||||
getConfig()->main->logsPath = dirname(__DIR__) . '/logs/test2.log';
|
||||
getConfig()->main->logsPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/test2.log');
|
||||
Logger::init();
|
||||
|
||||
Logger::log('nonsense');
|
|
@ -26,8 +26,8 @@ class LoggerTest extends AbstractTest
|
|||
|
||||
public function testPathChanging()
|
||||
{
|
||||
$logPath = dirname(__DIR__) . '/logs/{yyyy}-{mm}-{dd}.log';
|
||||
$realLogPath = dirname(__DIR__) . '/logs/' . date('Y-m-d') . '.log';
|
||||
$logPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/{yyyy}-{mm}-{dd}.log');
|
||||
$realLogPath = TextHelper::absolutePath(getConfig()->rootDir . '/tests/logs/' . date('Y-m-d') . '.log');
|
||||
|
||||
getConfig()->main->logsPath = $logPath;
|
||||
$this->assert->doesNotThrow(function()
|