Reorganized tests file structure

This commit is contained in:
Marcin Kurczewski 2014-05-13 21:09:39 +02:00
parent bca92f1f71
commit a38b280098
73 changed files with 5 additions and 5 deletions

View file

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 426 B

View file

Before

Width:  |  Height:  |  Size: 734 B

After

Width:  |  Height:  |  Size: 734 B

View file

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

View file

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

View file

@ -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)

View file

@ -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');

View file

@ -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()