diff --git a/tests/TestFiles/image.gif b/tests/Files/image.gif similarity index 100% rename from tests/TestFiles/image.gif rename to tests/Files/image.gif diff --git a/tests/TestFiles/image.jpg b/tests/Files/image.jpg similarity index 100% rename from tests/TestFiles/image.jpg rename to tests/Files/image.jpg diff --git a/tests/TestFiles/image.png b/tests/Files/image.png similarity index 100% rename from tests/TestFiles/image.png rename to tests/Files/image.png diff --git a/tests/TestFiles/text.txt b/tests/Files/text.txt similarity index 100% rename from tests/TestFiles/text.txt rename to tests/Files/text.txt diff --git a/tests/TestFiles/thumb.jpg b/tests/Files/thumb.jpg similarity index 100% rename from tests/TestFiles/thumb.jpg rename to tests/Files/thumb.jpg diff --git a/tests/Mockers/AbstractMocker.php b/tests/Support/Mockers/AbstractMocker.php similarity index 100% rename from tests/Mockers/AbstractMocker.php rename to tests/Support/Mockers/AbstractMocker.php diff --git a/tests/Mockers/CommentMocker.php b/tests/Support/Mockers/CommentMocker.php similarity index 100% rename from tests/Mockers/CommentMocker.php rename to tests/Support/Mockers/CommentMocker.php diff --git a/tests/Mockers/IMocker.php b/tests/Support/Mockers/IMocker.php similarity index 100% rename from tests/Mockers/IMocker.php rename to tests/Support/Mockers/IMocker.php diff --git a/tests/Mockers/PostMocker.php b/tests/Support/Mockers/PostMocker.php similarity index 100% rename from tests/Mockers/PostMocker.php rename to tests/Support/Mockers/PostMocker.php diff --git a/tests/Mockers/TagMocker.php b/tests/Support/Mockers/TagMocker.php similarity index 100% rename from tests/Mockers/TagMocker.php rename to tests/Support/Mockers/TagMocker.php diff --git a/tests/Mockers/UserMocker.php b/tests/Support/Mockers/UserMocker.php similarity index 100% rename from tests/Mockers/UserMocker.php rename to tests/Support/Mockers/UserMocker.php diff --git a/tests/TestSupport.php b/tests/Support/TestSupport.php similarity index 85% rename from tests/TestSupport.php rename to tests/Support/TestSupport.php index d23662a2..271d8e99 100644 --- a/tests/TestSupport.php +++ b/tests/Support/TestSupport.php @@ -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) diff --git a/tests/AbstractFullApiTest.php b/tests/Tests/AbstractFullApiTest.php similarity index 100% rename from tests/AbstractFullApiTest.php rename to tests/Tests/AbstractFullApiTest.php diff --git a/tests/AbstractTest.php b/tests/Tests/AbstractTest.php similarity index 100% rename from tests/AbstractTest.php rename to tests/Tests/AbstractTest.php diff --git a/tests/Api/ApiArgumentTest.php b/tests/Tests/ApiTests/ApiArgumentTest.php similarity index 100% rename from tests/Api/ApiArgumentTest.php rename to tests/Tests/ApiTests/ApiArgumentTest.php diff --git a/tests/Api/ApiAuthTest.php b/tests/Tests/ApiTests/ApiAuthTest.php similarity index 100% rename from tests/Api/ApiAuthTest.php rename to tests/Tests/ApiTests/ApiAuthTest.php diff --git a/tests/Api/ApiEmailRequirementsTest.php b/tests/Tests/ApiTests/ApiEmailRequirementsTest.php similarity index 100% rename from tests/Api/ApiEmailRequirementsTest.php rename to tests/Tests/ApiTests/ApiEmailRequirementsTest.php diff --git a/tests/Api/ApiPrivilegeTest.php b/tests/Tests/ApiTests/ApiPrivilegeTest.php similarity index 100% rename from tests/Api/ApiPrivilegeTest.php rename to tests/Tests/ApiTests/ApiPrivilegeTest.php diff --git a/tests/Api/Common/CommentRetrieverTest.php b/tests/Tests/ApiTests/Common/CommentRetrieverTest.php similarity index 100% rename from tests/Api/Common/CommentRetrieverTest.php rename to tests/Tests/ApiTests/Common/CommentRetrieverTest.php diff --git a/tests/Api/Common/PostRetrieverTest.php b/tests/Tests/ApiTests/Common/PostRetrieverTest.php similarity index 100% rename from tests/Api/Common/PostRetrieverTest.php rename to tests/Tests/ApiTests/Common/PostRetrieverTest.php diff --git a/tests/Api/Common/SafePostRetrieverTest.php b/tests/Tests/ApiTests/Common/SafePostRetrieverTest.php similarity index 100% rename from tests/Api/Common/SafePostRetrieverTest.php rename to tests/Tests/ApiTests/Common/SafePostRetrieverTest.php diff --git a/tests/Api/Common/UserRetrieverTest.php b/tests/Tests/ApiTests/Common/UserRetrieverTest.php similarity index 100% rename from tests/Api/Common/UserRetrieverTest.php rename to tests/Tests/ApiTests/Common/UserRetrieverTest.php diff --git a/tests/JobTests/AcceptUserRegistrationJobTest.php b/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php similarity index 100% rename from tests/JobTests/AcceptUserRegistrationJobTest.php rename to tests/Tests/JobTests/AcceptUserRegistrationJobTest.php diff --git a/tests/JobTests/ActivateUserEmailJobTest.php b/tests/Tests/JobTests/ActivateUserEmailJobTest.php similarity index 100% rename from tests/JobTests/ActivateUserEmailJobTest.php rename to tests/Tests/JobTests/ActivateUserEmailJobTest.php diff --git a/tests/JobTests/AddCommentJobTest.php b/tests/Tests/JobTests/AddCommentJobTest.php similarity index 100% rename from tests/JobTests/AddCommentJobTest.php rename to tests/Tests/JobTests/AddCommentJobTest.php diff --git a/tests/JobTests/AddPostJobTest.php b/tests/Tests/JobTests/AddPostJobTest.php similarity index 100% rename from tests/JobTests/AddPostJobTest.php rename to tests/Tests/JobTests/AddPostJobTest.php diff --git a/tests/JobTests/AddUserJobTest.php b/tests/Tests/JobTests/AddUserJobTest.php similarity index 100% rename from tests/JobTests/AddUserJobTest.php rename to tests/Tests/JobTests/AddUserJobTest.php diff --git a/tests/JobTests/DeleteCommentJobTest.php b/tests/Tests/JobTests/DeleteCommentJobTest.php similarity index 100% rename from tests/JobTests/DeleteCommentJobTest.php rename to tests/Tests/JobTests/DeleteCommentJobTest.php diff --git a/tests/JobTests/DeletePostJobTest.php b/tests/Tests/JobTests/DeletePostJobTest.php similarity index 100% rename from tests/JobTests/DeletePostJobTest.php rename to tests/Tests/JobTests/DeletePostJobTest.php diff --git a/tests/JobTests/DeleteUserJobTest.php b/tests/Tests/JobTests/DeleteUserJobTest.php similarity index 100% rename from tests/JobTests/DeleteUserJobTest.php rename to tests/Tests/JobTests/DeleteUserJobTest.php diff --git a/tests/JobTests/EditCommentJobTest.php b/tests/Tests/JobTests/EditCommentJobTest.php similarity index 100% rename from tests/JobTests/EditCommentJobTest.php rename to tests/Tests/JobTests/EditCommentJobTest.php diff --git a/tests/JobTests/EditPostContentJobTest.php b/tests/Tests/JobTests/EditPostContentJobTest.php similarity index 100% rename from tests/JobTests/EditPostContentJobTest.php rename to tests/Tests/JobTests/EditPostContentJobTest.php diff --git a/tests/JobTests/EditPostJobTest.php b/tests/Tests/JobTests/EditPostJobTest.php similarity index 100% rename from tests/JobTests/EditPostJobTest.php rename to tests/Tests/JobTests/EditPostJobTest.php diff --git a/tests/JobTests/EditPostRelationsJobTest.php b/tests/Tests/JobTests/EditPostRelationsJobTest.php similarity index 100% rename from tests/JobTests/EditPostRelationsJobTest.php rename to tests/Tests/JobTests/EditPostRelationsJobTest.php diff --git a/tests/JobTests/EditPostSafetyJobTest.php b/tests/Tests/JobTests/EditPostSafetyJobTest.php similarity index 100% rename from tests/JobTests/EditPostSafetyJobTest.php rename to tests/Tests/JobTests/EditPostSafetyJobTest.php diff --git a/tests/JobTests/EditPostSourceJobTest.php b/tests/Tests/JobTests/EditPostSourceJobTest.php similarity index 100% rename from tests/JobTests/EditPostSourceJobTest.php rename to tests/Tests/JobTests/EditPostSourceJobTest.php diff --git a/tests/JobTests/EditPostTagsJobTest.php b/tests/Tests/JobTests/EditPostTagsJobTest.php similarity index 100% rename from tests/JobTests/EditPostTagsJobTest.php rename to tests/Tests/JobTests/EditPostTagsJobTest.php diff --git a/tests/JobTests/EditPostThumbJobTest.php b/tests/Tests/JobTests/EditPostThumbJobTest.php similarity index 100% rename from tests/JobTests/EditPostThumbJobTest.php rename to tests/Tests/JobTests/EditPostThumbJobTest.php diff --git a/tests/JobTests/EditUserAccessRankJobTest.php b/tests/Tests/JobTests/EditUserAccessRankJobTest.php similarity index 100% rename from tests/JobTests/EditUserAccessRankJobTest.php rename to tests/Tests/JobTests/EditUserAccessRankJobTest.php diff --git a/tests/JobTests/EditUserEmailJobTest.php b/tests/Tests/JobTests/EditUserEmailJobTest.php similarity index 100% rename from tests/JobTests/EditUserEmailJobTest.php rename to tests/Tests/JobTests/EditUserEmailJobTest.php diff --git a/tests/JobTests/EditUserJobTest.php b/tests/Tests/JobTests/EditUserJobTest.php similarity index 100% rename from tests/JobTests/EditUserJobTest.php rename to tests/Tests/JobTests/EditUserJobTest.php diff --git a/tests/JobTests/EditUserNameJobTest.php b/tests/Tests/JobTests/EditUserNameJobTest.php similarity index 100% rename from tests/JobTests/EditUserNameJobTest.php rename to tests/Tests/JobTests/EditUserNameJobTest.php diff --git a/tests/JobTests/EditUserPasswordJobTest.php b/tests/Tests/JobTests/EditUserPasswordJobTest.php similarity index 100% rename from tests/JobTests/EditUserPasswordJobTest.php rename to tests/Tests/JobTests/EditUserPasswordJobTest.php diff --git a/tests/JobTests/FeaturePostJobTest.php b/tests/Tests/JobTests/FeaturePostJobTest.php similarity index 100% rename from tests/JobTests/FeaturePostJobTest.php rename to tests/Tests/JobTests/FeaturePostJobTest.php diff --git a/tests/JobTests/FlagPostJobTest.php b/tests/Tests/JobTests/FlagPostJobTest.php similarity index 100% rename from tests/JobTests/FlagPostJobTest.php rename to tests/Tests/JobTests/FlagPostJobTest.php diff --git a/tests/JobTests/FlagUserJobTest.php b/tests/Tests/JobTests/FlagUserJobTest.php similarity index 100% rename from tests/JobTests/FlagUserJobTest.php rename to tests/Tests/JobTests/FlagUserJobTest.php diff --git a/tests/JobTests/GetLogJobTest.php b/tests/Tests/JobTests/GetLogJobTest.php similarity index 100% rename from tests/JobTests/GetLogJobTest.php rename to tests/Tests/JobTests/GetLogJobTest.php diff --git a/tests/JobTests/GetPostContentJobTest.php b/tests/Tests/JobTests/GetPostContentJobTest.php similarity index 100% rename from tests/JobTests/GetPostContentJobTest.php rename to tests/Tests/JobTests/GetPostContentJobTest.php diff --git a/tests/JobTests/GetPostJobTest.php b/tests/Tests/JobTests/GetPostJobTest.php similarity index 100% rename from tests/JobTests/GetPostJobTest.php rename to tests/Tests/JobTests/GetPostJobTest.php diff --git a/tests/JobTests/GetPostThumbJobTest.php b/tests/Tests/JobTests/GetPostThumbJobTest.php similarity index 100% rename from tests/JobTests/GetPostThumbJobTest.php rename to tests/Tests/JobTests/GetPostThumbJobTest.php diff --git a/tests/JobTests/GetUserJobTest.php b/tests/Tests/JobTests/GetUserJobTest.php similarity index 100% rename from tests/JobTests/GetUserJobTest.php rename to tests/Tests/JobTests/GetUserJobTest.php diff --git a/tests/JobTests/ListCommentsJobTest.php b/tests/Tests/JobTests/ListCommentsJobTest.php similarity index 100% rename from tests/JobTests/ListCommentsJobTest.php rename to tests/Tests/JobTests/ListCommentsJobTest.php diff --git a/tests/JobTests/ListLogsJobTest.php b/tests/Tests/JobTests/ListLogsJobTest.php similarity index 68% rename from tests/JobTests/ListLogsJobTest.php rename to tests/Tests/JobTests/ListLogsJobTest.php index 8c7aaafd..5c174eb3 100644 --- a/tests/JobTests/ListLogsJobTest.php +++ b/tests/Tests/JobTests/ListLogsJobTest.php @@ -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'); diff --git a/tests/JobTests/ListPostsJobTest.php b/tests/Tests/JobTests/ListPostsJobTest.php similarity index 100% rename from tests/JobTests/ListPostsJobTest.php rename to tests/Tests/JobTests/ListPostsJobTest.php diff --git a/tests/JobTests/ListRelatedTagsJobTest.php b/tests/Tests/JobTests/ListRelatedTagsJobTest.php similarity index 100% rename from tests/JobTests/ListRelatedTagsJobTest.php rename to tests/Tests/JobTests/ListRelatedTagsJobTest.php diff --git a/tests/JobTests/ListTagsJobTest.php b/tests/Tests/JobTests/ListTagsJobTest.php similarity index 100% rename from tests/JobTests/ListTagsJobTest.php rename to tests/Tests/JobTests/ListTagsJobTest.php diff --git a/tests/JobTests/ListUsersJobTest.php b/tests/Tests/JobTests/ListUsersJobTest.php similarity index 100% rename from tests/JobTests/ListUsersJobTest.php rename to tests/Tests/JobTests/ListUsersJobTest.php diff --git a/tests/JobTests/MergeTagsJobTest.php b/tests/Tests/JobTests/MergeTagsJobTest.php similarity index 100% rename from tests/JobTests/MergeTagsJobTest.php rename to tests/Tests/JobTests/MergeTagsJobTest.php diff --git a/tests/JobTests/PasswordResetJobTest.php b/tests/Tests/JobTests/PasswordResetJobTest.php similarity index 100% rename from tests/JobTests/PasswordResetJobTest.php rename to tests/Tests/JobTests/PasswordResetJobTest.php diff --git a/tests/JobTests/PreviewCommentJobTest.php b/tests/Tests/JobTests/PreviewCommentJobTest.php similarity index 100% rename from tests/JobTests/PreviewCommentJobTest.php rename to tests/Tests/JobTests/PreviewCommentJobTest.php diff --git a/tests/JobTests/RenameTagsJobTest.php b/tests/Tests/JobTests/RenameTagsJobTest.php similarity index 100% rename from tests/JobTests/RenameTagsJobTest.php rename to tests/Tests/JobTests/RenameTagsJobTest.php diff --git a/tests/JobTests/ScorePostJobTest.php b/tests/Tests/JobTests/ScorePostJobTest.php similarity index 100% rename from tests/JobTests/ScorePostJobTest.php rename to tests/Tests/JobTests/ScorePostJobTest.php diff --git a/tests/JobTests/TogglePostFavoriteJobTest.php b/tests/Tests/JobTests/TogglePostFavoriteJobTest.php similarity index 100% rename from tests/JobTests/TogglePostFavoriteJobTest.php rename to tests/Tests/JobTests/TogglePostFavoriteJobTest.php diff --git a/tests/JobTests/TogglePostTagJobTest.php b/tests/Tests/JobTests/TogglePostTagJobTest.php similarity index 100% rename from tests/JobTests/TogglePostTagJobTest.php rename to tests/Tests/JobTests/TogglePostTagJobTest.php diff --git a/tests/JobTests/TogglePostVisibilityJobTest.php b/tests/Tests/JobTests/TogglePostVisibilityJobTest.php similarity index 100% rename from tests/JobTests/TogglePostVisibilityJobTest.php rename to tests/Tests/JobTests/TogglePostVisibilityJobTest.php diff --git a/tests/JobTests/ToggleUserBanJobTest.php b/tests/Tests/JobTests/ToggleUserBanJobTest.php similarity index 100% rename from tests/JobTests/ToggleUserBanJobTest.php rename to tests/Tests/JobTests/ToggleUserBanJobTest.php diff --git a/tests/MiscTests/AccessTest.php b/tests/Tests/MiscTests/AccessTest.php similarity index 100% rename from tests/MiscTests/AccessTest.php rename to tests/Tests/MiscTests/AccessTest.php diff --git a/tests/MiscTests/AuthTest.php b/tests/Tests/MiscTests/AuthTest.php similarity index 100% rename from tests/MiscTests/AuthTest.php rename to tests/Tests/MiscTests/AuthTest.php diff --git a/tests/MiscTests/LoggerTest.php b/tests/Tests/MiscTests/LoggerTest.php similarity index 87% rename from tests/MiscTests/LoggerTest.php rename to tests/Tests/MiscTests/LoggerTest.php index b61a34d9..d2a8f7c9 100644 --- a/tests/MiscTests/LoggerTest.php +++ b/tests/Tests/MiscTests/LoggerTest.php @@ -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() diff --git a/tests/MiscTests/TextHelperTest.php b/tests/Tests/MiscTests/TextHelperTest.php similarity index 100% rename from tests/MiscTests/TextHelperTest.php rename to tests/Tests/MiscTests/TextHelperTest.php diff --git a/tests/ModelTests/PostModelTest.php b/tests/Tests/ModelTests/PostModelTest.php similarity index 100% rename from tests/ModelTests/PostModelTest.php rename to tests/Tests/ModelTests/PostModelTest.php diff --git a/tests/ModelTests/PropertyModelTest.php b/tests/Tests/ModelTests/PropertyModelTest.php similarity index 100% rename from tests/ModelTests/PropertyModelTest.php rename to tests/Tests/ModelTests/PropertyModelTest.php diff --git a/tests/ModelTests/UserModelTest.php b/tests/Tests/ModelTests/UserModelTest.php similarity index 100% rename from tests/ModelTests/UserModelTest.php rename to tests/Tests/ModelTests/UserModelTest.php