summaryrefslogtreecommitdiff
path: root/tests/Unit/Database/Migration/MigrationTest.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-08-20 20:58:51 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-08-20 21:07:57 +0200
commitd6c8f1a61475fefa9594141aaf12a28d220bdaf8 (patch)
tree905051fdb1307f947c3a3a7be240609f8bc00e59 /tests/Unit/Database/Migration/MigrationTest.php
parentbf6efe532c8f2de84e95b090911280a9b1b61ce8 (diff)
parent2f41b9e4418def9b69cf237312bc592364585025 (diff)
Merge branch 'master' to 'rebuild-database'
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);
+ }
+}