snipe-it/tests/Unit/ActionLogTransformer/ReportTemplateActionLogTransformerTest.php

42 lines
1.1 KiB
PHP
Raw Normal View History

2024-10-30 14:25:07 -07:00
<?php
namespace Tests\Unit\ActionLogTransformer;
use App\Http\Transformers\ActionlogsTransformer;
use App\Models\Actionlog;
use App\Models\ReportTemplate;
use Tests\TestCase;
class ReportTemplateActionLogTransformerTest extends TestCase
{
public function testLogEntryForCreatingReportTemplateCanBeTransformed()
{
ReportTemplate::factory()->create();
$actionLogs = Actionlog::whereMorphedTo('item', ReportTemplate::class)->get();
// should be created when ActionLog is created
$this->assertCount(1, $actionLogs);
$results = (new ActionlogsTransformer())->transformActionlogs($actionLogs, 10);
$this->assertArrayHasKey('rows', $results);
$this->assertCount(1, $results['rows']);
}
public function testLogEntryForUpdatingReportTemplateCanBeDisplayedTransformed()
{
$this->markTestIncomplete();
}
public function testLogEntryForDeletingReportTemplateCanBeDisplayedTransformed()
{
$this->markTestIncomplete();
}
public function testLogsScopedProperly()
{
$this->markTestIncomplete();
}
}