blob: 4f6da9ad630cfb91e8a07761e73c41d05df02aef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
namespace Engelsystem\Test\Unit\Models;
use Engelsystem\Models\User\HasUserModel;
use Engelsystem\Test\Unit\HasDatabase;
use Engelsystem\Test\Unit\Models\User\Stub\HasUserModelImplementation;
use Engelsystem\Test\Unit\TestCase;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class HasUserModelTest extends TestCase
{
use HasDatabase;
/**
* @covers \Engelsystem\Models\User\HasUserModel::user
*/
public function testHasOneRelations()
{
/** @var HasUserModel $contact */
$model = new HasUserModelImplementation();
$this->assertInstanceOf(BelongsTo::class, $model->user());
}
/**
* Prepare test
*/
protected function setUp(): void
{
parent::setUp();
$this->initDatabase();
}
}
|