diff options
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); + } +} |