test fixes + new test data

This commit is contained in:
Dennis Eichhorn 2023-05-19 02:37:35 +00:00
parent b2dd5d3ed6
commit f396454830
2 changed files with 10 additions and 5 deletions

View File

@ -26,4 +26,11 @@ use phpOMS\Module\UpdaterAbstract;
*/
final class Updater extends UpdaterAbstract
{
/**
* Path of the file
*
* @var string
* @since 1.0.0
*/
public const PATH = __DIR__;
}

View File

@ -200,7 +200,7 @@ final class ApiController extends Controller
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
. '/Comments/'
. $comment->createdAt->format('Y') . '/' . $comment->createdAt->format('m')
. $comment->createdAt->format('Y/m')
. '/' . $comment->id;
$ref = new Reference();
@ -215,7 +215,7 @@ final class ApiController extends Controller
$collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection(
$accountPath,
$request->header->account,
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Comments/' . $comment->createdAt->format('Y') . '/' . $comment->createdAt->format('m') . '/' . $comment->id
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Comments/' . $comment->createdAt->format('Y/m') . '/' . $comment->id
);
}
@ -288,9 +288,7 @@ final class ApiController extends Controller
private function createCommentDir(Comment $comment) : string
{
return '/Modules/Comments/'
. $comment->createdAt->format('Y') . '/'
. $comment->createdAt->format('m') . '/'
. $comment->createdAt->format('d') . '/'
. $comment->createdAt->format('Y/m/d') . '/'
. $comment->id;
}