Files
animethemes-server/tests/Unit/Models/Wiki/Video/ScriptTest.php
T
paranarimasu 8b6b196c99 feat(admin): migrate db dumps from github to platform (#465)
* feat: migrate encoding scripts from github to platform

* style: fix StyleCI finding

* fix: don't concatenate updated videos when attempting to attach entry on video upload

* fix(api): fix field dependencies & feat(admin): upload script from video detail screen
2022-09-24 00:01:37 -05:00

44 lines
902 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Models\Wiki\Video;
use App\Models\Wiki\Video;
use App\Models\Wiki\Video\VideoScript;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Tests\TestCase;
/**
* Class ScriptTest.
*/
class ScriptTest extends TestCase
{
/**
* Dumps shall be nameable.
*
* @return void
*/
public function testNameable(): void
{
$script = VideoScript::factory()->createOne();
static::assertIsString($script->getName());
}
/**
* Scripts shall belong to a Video.
*
* @return void
*/
public function testVideo(): void
{
$script = VideoScript::factory()
->for(Video::factory())
->createOne();
static::assertInstanceOf(BelongsTo::class, $script->video());
static::assertInstanceOf(Video::class, $script->video()->first());
}
}