--TEST-- MongoDB\Driver\Exception\CommandException::hasErrorLabel() --FILE-- getProperty('errorLabels'); $resultDocumentProperty->setAccessible(true); $resultDocumentProperty->setValue($exception, $labels); var_dump($exception->hasErrorLabel('foo')); var_dump($exception->hasErrorLabel('bar')); ?> ===DONE=== --EXPECT-- bool(true) bool(false) ===DONE===