public function testIfWillDeletePlainDocument() { $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); $deleted = $em->delete(); $this->assertTrue($deleted); $notFound = $finder->findByPk($model->_id); $this->assertNull($notFound); $deleted = $em->delete(); $this->assertFalse($deleted); }