Exemple #1
0
 protected function setUp()
 {
     parent::setUp();
     foreach (self::fixtureData() as $item) {
         MongaPersistentObject::create($item, $this->fixture);
     }
 }
Exemple #2
0
 /**
  * Test MongaPersistent::create()
  *
  * @param array $data The data used to create the object.
  *
  * @dataProvider providerCreate
  * @group model
  * @group monga
  */
 public function testCreate($data)
 {
     try {
         $object = MongaPersistentObject::create($data, $this->fixture);
         $this->assertNotNull($object);
         $this->assertInstanceOf('Tacit\\Model\\Persistent', $object);
         $this->assertInstanceOf('Tacit\\Model\\Monga\\MongaPersistent', $object);
         $this->assertInstanceOf('Tacit\\Test\\Model\\Monga\\MongaPersistentObject', $object);
     } catch (ModelValidationException $e) {
         echo $e;
     }
 }