From 6f30040016a67c369b1ee55a6297d8e4a075c220 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 9 Oct 2020 00:20:24 +0200 Subject: [PATCH] fix @covers --- Models/AuditMapper.php | 25 +++++++++++++++ tests/Models/AuditMapperTest.php | 52 ++++++++++++++++++++++++++++++++ tests/Models/NullAuditTest.php | 32 ++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 tests/Models/AuditMapperTest.php create mode 100644 tests/Models/NullAuditTest.php diff --git a/Models/AuditMapper.php b/Models/AuditMapper.php index 452154e..deb3010 100755 --- a/Models/AuditMapper.php +++ b/Models/AuditMapper.php @@ -16,6 +16,7 @@ namespace Modules\Auditor\Models; use Modules\Admin\Models\AccountMapper; use phpOMS\DataStorage\Database\DataMapperAbstract; +use phpOMS\DataStorage\Database\RelationType; /** * Mapper class. @@ -91,4 +92,28 @@ final class AuditMapper extends DataMapperAbstract * @since 1.0.0 */ protected static string $createdAt = 'auditor_audit_created_at'; + + /** + * {@inheritdoc} + */ + public static function delete($obj, int $relations = RelationType::REFERENCE) + { + return -1; + } + + /** + * {@inheritdoc} + */ + public static function update($obj, int $relations = RelationType::ALL, int $depth = 3) + { + return -1; + } + + /** + * {@inheritdoc} + */ + public static function updateArray(array &$obj, int $relations = RelationType::ALL, int $depth = 1) + { + return -1; + } } diff --git a/tests/Models/AuditMapperTest.php b/tests/Models/AuditMapperTest.php new file mode 100644 index 0000000..949d57a --- /dev/null +++ b/tests/Models/AuditMapperTest.php @@ -0,0 +1,52 @@ +