test fixes + new test data

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

@ -48,9 +48,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
*/
protected ModuleAbstract $module;
protected static int $depreciationHelper = 0;
protected static ?int $depreciationHelper = 0;
protected static int $depreciationHelper2 = 0;
protected static ?int $depreciationHelper2 = 0;
/**
* {@inheritdoc}
@ -139,7 +139,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
TestUtils::setMember($request, 'files', $files);
$this->module->apiTemplateCreate($request, $response);
self::assertGreaterThan(0, self::$depreciationHelper = $response->get('')['response']->id);
self::assertGreaterThan(0, self::$depreciationHelper = $response->get('')['response']?->id);
\rmdir(__DIR__ . '/temp');
}
@ -186,7 +186,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
TestUtils::setMember($request, 'files', $files);
$this->module->apiTemplateCreate($request, $response);
self::assertGreaterThan(0, self::$depreciationHelper2 = $response->get('')['response']->id);
self::assertGreaterThan(0, self::$depreciationHelper2 = $response->get('')['response']?->id);
\rmdir(__DIR__ . '/temp');
}

View File

@ -0,0 +1 @@
Test data
1 Test data