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