Exemplo n.º 1
0
 public function testIfWillDeletePlainDocumentByPk()
 {
     $model = new PlainWithBasicAttributes();
     $model->_id = new MongoId();
     $em = new EntityManager($model);
     $em->save();
     $finder = new Finder($model);
     $found = $finder->findByPk($model->_id);
     $this->assertInstanceOf(PlainWithBasicAttributes::class, $found);
     $em->deleteByPk($model->_id);
     $notFound = $finder->findByPk($model->_id);
     $this->assertNull($notFound);
 }