The Mongolid\Schema\Schema that describes the entity will be generated on the go based on the $fields.
Наследование: implements Mongolid\Model\AttributesAccessInterface, implements Mongolid\Schema\HasSchemaInterface, use trait Mongolid\Model\Attributes, use trait Mongolid\Model\Relations
Пример #1
0
 public function testShouldGetSetWriteConcernInActiveRecordClass()
 {
     $this->assertEquals(1, $this->entity->getWriteConcern());
     $this->assertEquals(1, $this->entity->getWriteConcern());
     $this->entity->setWriteConcern(0);
     $this->assertEquals(0, $this->entity->getWriteConcern());
 }
 /**
  * Overwrites the delete method in order to be able to check for
  * the expectation in the localMock in order to call the delete method
  * into the existing mock and avoid touching the database.
  *
  * @return bool
  */
 public function delete()
 {
     if ($this->localMockHasExpectationsFor('delete')) {
         return $this->getLocalMock()->delete();
     }
     return parent::delete();
 }