コード例 #1
0
ファイル: PlainTest.php プロジェクト: maslosoft/mangantest
 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);
 }