summaryrefslogtreecommitdiff
path: root/tests/Unit/Models/User/HasUserModelTest.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-06 14:15:54 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commit8e62c4c52c27f9432820915deeb699c3d1f58ce7 (patch)
tree43d22891924aeaa42108c21309da6b09b5390128 /tests/Unit/Models/User/HasUserModelTest.php
parentb443b53919f50bd0176e7b67dfd1efc28276a770 (diff)
Added new user models
Diffstat (limited to 'tests/Unit/Models/User/HasUserModelTest.php')
-rw-r--r--tests/Unit/Models/User/HasUserModelTest.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/Unit/Models/User/HasUserModelTest.php b/tests/Unit/Models/User/HasUserModelTest.php
new file mode 100644
index 00000000..07f3d726
--- /dev/null
+++ b/tests/Unit/Models/User/HasUserModelTest.php
@@ -0,0 +1,33 @@
+<?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 Illuminate\Database\Eloquent\Relations\BelongsTo;
+use PHPUnit\Framework\TestCase;
+
+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()
+ {
+ $this->initDatabase();
+ }
+}