File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -81,4 +81,10 @@ public function testQueryLog()
8181 $ this ->assertEquals (5 , count (DB ::getQueryLog ()));
8282 }
8383
84+ public function testSchemaBuilder ()
85+ {
86+ $ schema = DB ::connection ('mongodb ' )->getSchemaBuilder ();
87+ $ this ->assertInstanceOf ('Jenssegers\Mongodb\Schema\Builder ' , $ schema );
88+ }
89+
8490}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public function testCreate()
1616 {
1717 Schema::create ('newcollection ' );
1818 $ this ->assertTrue (Schema::hasCollection ('newcollection ' ));
19+ $ this ->assertTrue (Schema::hasTable ('newcollection ' ));
1920 }
2021
2122 public function testDrop ()
@@ -25,6 +26,21 @@ public function testDrop()
2526 $ this ->assertFalse (Schema::hasCollection ('newcollection ' ));
2627 }
2728
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+
2844 public function testIndex ()
2945 {
3046 Schema::collection ('newcollection ' , function ($ collection )
You can’t perform that action at this time.
0 commit comments