Ejemplo n.º 1
0
 public function testCreate()
 {
     $document = My_ShantyMongo_User::create();
     $this->assertInternalType(PHPUnit_Framework_Constraint_IsType::TYPE_OBJECT, $document);
     $this->assertEquals('My_ShantyMongo_User', get_class($document));
     $this->assertEquals('user', $document->getConfigAttribute('collection'));
     $this->assertTrue($document->isNewDocument());
     $document = My_ShantyMongo_User::create(array('email' => '*****@*****.**'), false);
     $this->assertEquals('*****@*****.**', $document->email);
     $this->assertFalse($document->isNewDocument());
 }