diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-16 12:06:18 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-16 12:06:18 +0200 |
commit | 0734807eef5a6b638b06d57aef6ee59ac78a3456 (patch) | |
tree | 3af73fdc293ab18962078c1a92e07d803009f1f5 /tests/Unit/Models/BaseModelTest.php | |
parent | d0abc27c079f058c40a74b89e54bd21ba4aad53e (diff) | |
parent | ac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff) |
Merge remote-tracking branch 'MyIgel/logentry-model'
Diffstat (limited to 'tests/Unit/Models/BaseModelTest.php')
-rw-r--r-- | tests/Unit/Models/BaseModelTest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Unit/Models/BaseModelTest.php b/tests/Unit/Models/BaseModelTest.php new file mode 100644 index 00000000..52cb8c7b --- /dev/null +++ b/tests/Unit/Models/BaseModelTest.php @@ -0,0 +1,22 @@ +<?php + +namespace Engelsystem\Test\Unit\Models; + +use Engelsystem\Test\Unit\Models\Stub\BaseModelImplementation; +use PHPUnit\Framework\TestCase; + +class BaseModelTest extends TestCase +{ + /** + * @covers \Engelsystem\Models\BaseModel::create + */ + public function testCreate() + { + $model = new BaseModelImplementation(); + $newModel = $model->create(['foo' => 'bar']); + + $this->assertNotEquals($model, $newModel); + $this->assertEquals('bar', $newModel->foo); + $this->assertEquals(1, $newModel->saveCount); + } +} |