Просмотр исходного кода

Skip aggregation tests until bug in library is fixed

Andreas Braun 10 лет назад
Родитель
Сommit
199e9d287f
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      README.md
  2. 2 0
      tests/Alcaeus/MongoDbAdapter/MongoCollectionTest.php

+ 2 - 0
README.md

@@ -91,6 +91,8 @@ return `0` as connection ID.
 
 ## 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)
  method does not yet return the same result as the original method. Instead, it
  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()
     {
+        $this->skipTestUnless(extension_loaded('mongo'));
         $collection = $this->getCollection();
 
         $this->prepareData();
@@ -422,6 +423,7 @@ class MongoCollectionTest extends TestCase
 
     public function testAggregateTimeoutException()
     {
+        $this->skipTestUnless(extension_loaded('mongo'));
         $collection = $this->getCollection();
 
         $this->failMaxTimeMS();