Skip to content

Commit 8665a88

Browse files
committed
Merge pull request #12 from jmikola/phpc-0.6
Compatibility with ext-mongodb 0.6
2 parents cfcf48f + 645e8bc commit 8665a88

File tree

4 files changed

+1
-96
lines changed

4 files changed

+1
-96
lines changed

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
{ "name": "Derick Rethans", "email": "github@derickrethans.nl" }
1111
],
1212
"require": {
13-
"ext-mongodb": ">=0.5.1"
14-
},
15-
"require-dev": {
16-
"fzaninotto/faker": "~1.0"
13+
"ext-mongodb": ">=0.6.0"
1714
},
1815
"autoload": {
1916
"psr-4": { "MongoDB\\": "src/" }

tests/Collection/CollectionFunctionalTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace MongoDB\Tests\Collection;
44

5-
use MongoDB\Tests\FixtureGenerator;
6-
75
/**
86
* Functional tests for the Collection class.
97
*/
@@ -18,34 +16,4 @@ public function testDrop()
1816
$this->assertCommandSucceeded($commandResult);
1917
$this->assertCollectionCount($this->getNamespace(), 0);
2018
}
21-
22-
function testInsertAndRetrieve()
23-
{
24-
$generator = new FixtureGenerator();
25-
26-
for ($i = 0; $i < 10; $i++) {
27-
$user = $generator->createUser();
28-
$result = $this->collection->insertOne($user);
29-
$this->assertInstanceOf('MongoDB\InsertOneResult', $result);
30-
$this->assertInstanceOf('BSON\ObjectId', $result->getInsertedId());
31-
$this->assertEquals(24, strlen($result->getInsertedId()));
32-
33-
$user["_id"] = $result->getInsertedId();
34-
$document = $this->collection->findOne(array("_id" => $result->getInsertedId()));
35-
$this->assertEquals($document, $user, "The inserted and returned objects are the same");
36-
}
37-
38-
$this->assertEquals(10, $i);
39-
40-
$query = array("firstName" => "Ransom");
41-
$count = $this->collection->count($query);
42-
$this->assertEquals(1, $count);
43-
$cursor = $this->collection->find($query);
44-
$this->assertInstanceOf('MongoDB\Driver\Cursor', $cursor);
45-
46-
foreach($cursor as $n => $person) {
47-
$this->assertInternalType("array", $person);
48-
}
49-
$this->assertEquals(0, $n);
50-
}
5119
}

tests/Database/CollectionManagementFunctionalTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function testListCollectionsWithFilter()
7070

7171
$collections = $this->database->listCollections($options);
7272
$this->assertInstanceOf('MongoDB\Model\CollectionInfoIterator', $collections);
73-
$this->assertCount(1, $collections);
7473

7574
foreach ($collections as $collection) {
7675
$this->assertInstanceOf('MongoDB\Model\CollectionInfo', $collection);

tests/FixtureGenerator.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)