mirror of
https://github.com/Karaka-Management/oms-Auditor.git
synced 2026-02-16 13:38:41 +00:00
template fixes + bug fixes + style fixes
This commit is contained in:
parent
7ccdb3e04f
commit
5029408306
|
|
@ -89,7 +89,7 @@ final class CliController extends Controller
|
||||||
->where('id', $endLastBatchId, '>')
|
->where('id', $endLastBatchId, '>')
|
||||||
->sort('id', OrderType::ASC)
|
->sort('id', OrderType::ASC)
|
||||||
->limit(50)
|
->limit(50)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
foreach ($batch as $audit) {
|
foreach ($batch as $audit) {
|
||||||
$current = $audit;
|
$current = $audit;
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$logs = AuditMapper::getAll()
|
$logs = AuditMapper::getAll()
|
||||||
->sort('id', 'DESC')
|
->sort('id', 'DESC')
|
||||||
->limit(100)
|
->limit(100)
|
||||||
->execute();
|
->executeGetArray();
|
||||||
|
|
||||||
foreach($logs as $log) {
|
foreach($logs as $log) {
|
||||||
if ($log->id > 0
|
if ($log->id > 0
|
||||||
|
|
@ -120,7 +120,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testLogUpdate() : void
|
public function testLogUpdate() : void
|
||||||
{
|
{
|
||||||
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 1, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs = AuditMapper::getAll()->execute();
|
$logs = AuditMapper::getAll()->executeGetArray();
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach($logs as $log) {
|
foreach($logs as $log) {
|
||||||
|
|
@ -144,9 +144,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
#[\PHPUnit\Framework\Attributes\Group('module')]
|
#[\PHPUnit\Framework\Attributes\Group('module')]
|
||||||
public function testLogUpdateWithoutChange() : void
|
public function testLogUpdateWithoutChange() : void
|
||||||
{
|
{
|
||||||
$logs = AuditMapper::getAll()->execute();
|
$logs = AuditMapper::getAll()->executeGetArray();
|
||||||
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 2, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogUpdate(1, ['id' => 2, 'test' => true], ['id' => 2, 'test' => true], 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs2 = AuditMapper::getAll()->execute();
|
$logs2 = AuditMapper::getAll()->executeGetArray();
|
||||||
|
|
||||||
self::assertGreaterThan(0, \count($logs));
|
self::assertGreaterThan(0, \count($logs));
|
||||||
self::assertEquals(\count($logs), \count($logs2));
|
self::assertEquals(\count($logs), \count($logs2));
|
||||||
|
|
@ -157,7 +157,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testLogDelete() : void
|
public function testLogDelete() : void
|
||||||
{
|
{
|
||||||
$this->module->eventLogDelete(1, ['id' => 1, 'test' => true], null, 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
$this->module->eventLogDelete(1, ['id' => 1, 'test' => true], null, 1, 'test-trigger', 'Auditor', 'abc', 'def');
|
||||||
$logs = AuditMapper::getAll()->execute();
|
$logs = AuditMapper::getAll()->executeGetArray();
|
||||||
|
|
||||||
foreach($logs as $log) {
|
foreach($logs as $log) {
|
||||||
if ($log->id > 0
|
if ($log->id > 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user