public function testGetModel() { $directory = new FooDirectory($this->getMongoDB()); $model = $directory->create([]); PHPUnit::assertTrue($model instanceof FooModel); $model = $directory->create([]); PHPUnit::assertTrue($model instanceof FooModel); }
public function testSerializeJSON() { $dir = new FooDirectory($this->getMongoDB()); $model = $dir->create(['baz' => 'one']); PHPUnit::assertContains('"baz":"one"', json_encode($model)); }