summaryrefslogtreecommitdiff
path: root/tests/Unit/Database/Migration/MigrationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Database/Migration/MigrationTest.php')
-rw-r--r--tests/Unit/Database/Migration/MigrationTest.php24
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);
+ }
+}