Przeglądaj źródła

Skip aggregation tests until bug in library is fixed

Andreas Braun 10 lat temu
rodzic
commit
199e9d287f

+ 2 - 0
README.md

@@ -91,6 +91,8 @@ return `0` as connection ID.
 
 
 ## MongoCollection
 ## MongoCollection
 
 
+ - The [aggregate](https://secure.php.net/manual/en/mongocollection.aggregate.php)
+ method is not working because of a bug in the underlying library.
  - The [createIndex](https://secure.php.net/manual/en/mongocollection.createindex.php)
  - The [createIndex](https://secure.php.net/manual/en/mongocollection.createindex.php)
  method does not yet return the same result as the original method. Instead, it
  method does not yet return the same result as the original method. Instead, it
  always returns the name of the index created.
  always returns the name of the index created.

+ 2 - 0
tests/Alcaeus/MongoDbAdapter/MongoCollectionTest.php

@@ -394,6 +394,7 @@ class MongoCollectionTest extends TestCase
 
 
     public function testAggregate()
     public function testAggregate()
     {
     {
+        $this->skipTestUnless(extension_loaded('mongo'));
         $collection = $this->getCollection();
         $collection = $this->getCollection();
 
 
         $this->prepareData();
         $this->prepareData();
@@ -422,6 +423,7 @@ class MongoCollectionTest extends TestCase
 
 
     public function testAggregateTimeoutException()
     public function testAggregateTimeoutException()
     {
     {
+        $this->skipTestUnless(extension_loaded('mongo'));
         $collection = $this->getCollection();
         $collection = $this->getCollection();
 
 
         $this->failMaxTimeMS();
         $this->failMaxTimeMS();