test fixes + new test data

This commit is contained in:
Dennis Eichhorn 2023-05-19 02:37:35 +00:00
parent 09698caa0a
commit 4f50728503
4 changed files with 12 additions and 7 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

@ -285,14 +285,14 @@ final class ApiController extends Controller
foreach ($uploaded as $media) {
$accountPath = '/Accounts/' . $account->id . ' ' . $account->login
. '/Editor/'
. $doc->createdAt->format('Y') . '/' . $doc->createdAt->format('m')
. $doc->createdAt->format('Y/m')
. '/' . $doc->id;
if ($collection === null) {
$collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection(
$accountPath,
$request->header->account,
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Editor/' . $doc->createdAt->format('Y') . '/' . $doc->createdAt->format('m') . '/' . $doc->id
__DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Editor/' . $doc->createdAt->format('Y/m') . '/' . $doc->id
);
}
@ -381,9 +381,7 @@ final class ApiController extends Controller
private function createEditorDir(EditorDoc $doc) : string
{
return '/Modules/Editor/'
. $doc->createdAt->format('Y') . '/'
. $doc->createdAt->format('m') . '/'
. $doc->createdAt->format('d') . '/'
. $doc->createdAt->format('Y/m/d') . '/'
. $doc->id;
}

View File

@ -37,7 +37,7 @@ class BaseView extends View
* @var string
* @since 1.0.0
*/
private string $id = '';
public string $id = '';
/**
* {@inheritdoc}

View File

@ -36,7 +36,7 @@ class TextView extends View
* @var string
* @since 1.0.0
*/
private string $id = '';
public string $id = '';
/**
* Dom name