Commit a16c1884 authored by Jeremy Mikola's avatar Jeremy Mikola

Validate GridFS data modification command document in spec tests

Ensure the command document is non-empty before attempting to access the command and collection names.
parent a29c7839
...@@ -269,6 +269,10 @@ class SpecFunctionalTest extends FunctionalTestCase ...@@ -269,6 +269,10 @@ class SpecFunctionalTest extends FunctionalTestCase
*/ */
private function executeDataModification(array $dataModification) private function executeDataModification(array $dataModification)
{ {
if (empty($dataModification)) {
throw new LogicException('Command for data modification is empty');
}
foreach ($dataModification as $type => $collectionName) { foreach ($dataModification as $type => $collectionName) {
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment