Ejemplo n.º 1
0
 public function testIfWillRefreshModelWithI18N()
 {
     $model = new ModelWithI18N();
     $model->_id = new MongoId();
     $model->title = 'title';
     $em = new EntityManager($model);
     $em->save();
     $model->title = 'another';
     $refreshed = $em->refresh();
     $this->assertTrue($refreshed);
     $this->assertSame('title', $model->title);
     $em->deleteAll();
     $notRefreshed = $em->refresh();
     $this->assertFalse($notRefreshed);
 }