File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -81,4 +81,10 @@ public function testQueryLog()
81
81
$ this ->assertEquals (5 , count (DB ::getQueryLog ()));
82
82
}
83
83
84
+ public function testSchemaBuilder ()
85
+ {
86
+ $ schema = DB ::connection ('mongodb ' )->getSchemaBuilder ();
87
+ $ this ->assertInstanceOf ('Jenssegers\Mongodb\Schema\Builder ' , $ schema );
88
+ }
89
+
84
90
}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public function testCreate()
16
16
{
17
17
Schema::create ('newcollection ' );
18
18
$ this ->assertTrue (Schema::hasCollection ('newcollection ' ));
19
+ $ this ->assertTrue (Schema::hasTable ('newcollection ' ));
19
20
}
20
21
21
22
public function testDrop ()
@@ -25,6 +26,21 @@ public function testDrop()
25
26
$ this ->assertFalse (Schema::hasCollection ('newcollection ' ));
26
27
}
27
28
29
+ public function testBluePrint ()
30
+ {
31
+ $ instance = $ this ;
32
+
33
+ Schema::collection ('newcollection ' , function ($ collection ) use ($ instance )
34
+ {
35
+ $ instance ->assertInstanceOf ('Jenssegers\Mongodb\Schema\Blueprint ' , $ collection );
36
+ });
37
+
38
+ Schema::table ('newcollection ' , function ($ collection ) use ($ instance )
39
+ {
40
+ $ instance ->assertInstanceOf ('Jenssegers\Mongodb\Schema\Blueprint ' , $ collection );
41
+ });
42
+ }
43
+
28
44
public function testIndex ()
29
45
{
30
46
Schema::collection ('newcollection ' , function ($ collection )
You can’t perform that action at this time.
0 commit comments