summaryrefslogtreecommitdiff
path: root/tests/Unit/Database/Migration/MigrationTest.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2018-09-02 16:55:35 +0200
committerGitHub <noreply@github.com>2018-09-02 16:55:35 +0200
commita103bc06e28f5eca6ba9c28c81ae1227d689f224 (patch)
tree759d675b621eed86b20f14abe448e83fa8d22562 /tests/Unit/Database/Migration/MigrationTest.php
parentbd8ceda6830f97247b73932b85ce41af5b8d2ab0 (diff)
parent2bebbeb1919e1d370ac5c0668e0db5ea63e73292 (diff)
Merge pull request #452 from MyIgel/rebuild-database
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);
+ }
+}