Skip to content

Commit 3f981df

Browse files
committed
Adding test for schema create with callback
1 parent e5cba0a commit 3f981df

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/SchemaTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ public function testCreate()
1414
$this->assertTrue(Schema::hasTable('newcollection'));
1515
}
1616

17+
public function testCreateWithCallback()
18+
{
19+
$instance = $this;
20+
21+
Schema::create('newcollection', function($collection) use ($instance)
22+
{
23+
$instance->assertInstanceOf('Jenssegers\Mongodb\Schema\Blueprint', $collection);
24+
});
25+
26+
$this->assertTrue(Schema::hasCollection('newcollection'));
27+
}
28+
1729
public function testDrop()
1830
{
1931
Schema::create('newcollection');

0 commit comments

Comments
 (0)