Commit 3f981df3 authored by Jens Segers's avatar Jens Segers

Adding test for schema create with callback

parent e5cba0a9
......@@ -14,6 +14,18 @@ class SchemaTest extends TestCase {
$this->assertTrue(Schema::hasTable('newcollection'));
}
public function testCreateWithCallback()
{
$instance = $this;
Schema::create('newcollection', function($collection) use ($instance)
{
$instance->assertInstanceOf('Jenssegers\Mongodb\Schema\Blueprint', $collection);
});
$this->assertTrue(Schema::hasCollection('newcollection'));
}
public function testDrop()
{
Schema::create('newcollection');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment