diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-01-16 21:26:59 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-01-16 21:47:21 +0100 |
commit | 235266ec53f620d94a080ed7ae8e77eaef6dbb3c (patch) | |
tree | a252b862443a3551e761e09338e9bce3ce99c394 /tests/Unit/Database/Migration/MigrationTest.php | |
parent | e44ba8456130fcd0a282ea91b5736d903f8c0496 (diff) |
Added basic database migration functionality
Diffstat (limited to 'tests/Unit/Database/Migration/MigrationTest.php')
-rw-r--r-- | tests/Unit/Database/Migration/MigrationTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Unit/Database/Migration/MigrationTest.php b/tests/Unit/Database/Migration/MigrationTest.php new file mode 100644 index 00000000..43bded09 --- /dev/null +++ b/tests/Unit/Database/Migration/MigrationTest.php @@ -0,0 +1,24 @@ +<?php + +namespace Engelsystem\Test\Unit\Database; + +use AnotherStuff; +use Illuminate\Database\Schema\Builder as SchemaBuilder; +use PHPUnit\Framework\MockObject\MockBuilder; +use PHPUnit\Framework\TestCase; + +class MigrationTest extends TestCase +{ + public function testConstructor() + { + require_once __DIR__ . '/Stub/2017_12_24_053300_another_stuff.php'; + + /** @var MockBuilder|SchemaBuilder $schemaBuilder */ + $schemaBuilder = $this->getMockBuilder(SchemaBuilder::class) + ->disableOriginalConstructor() + ->getMock(); + + $instance = new AnotherStuff($schemaBuilder); + $this->assertAttributeEquals($schemaBuilder, 'schema', $instance); + } +} |