engelsystem/tests/Unit/Models/User/UsesUserModelTest.php

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
619 B
PHP
Raw Normal View History

2018-10-06 14:15:54 +02:00
<?php
namespace Engelsystem\Test\Unit\Models\User;
2018-10-06 14:15:54 +02:00
use Engelsystem\Models\BaseModel;
use Engelsystem\Models\User\UsesUserModel;
2020-05-11 19:57:25 +02:00
use Engelsystem\Test\Unit\Models\ModelTest;
2018-10-06 14:15:54 +02:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2020-05-11 19:57:25 +02:00
class UsesUserModelTest extends ModelTest
2018-10-06 14:15:54 +02:00
{
/**
* @covers \Engelsystem\Models\User\UsesUserModel::user
2018-10-06 14:15:54 +02:00
*/
public function testHasOneRelations(): void
{
/** @var UsesUserModel $contact */
$model = new class extends BaseModel
{
use UsesUserModel;
};
2018-10-06 14:15:54 +02:00
$this->assertInstanceOf(BelongsTo::class, $model->user());
}
}