Skip to content

Commit 34c7b97

Browse files
committed
Remove Faker test dependency
1 parent cfcf48f commit 34c7b97

File tree

3 files changed

+0
-94
lines changed

3 files changed

+0
-94
lines changed

composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"require": {
1313
"ext-mongodb": ">=0.5.1"
1414
},
15-
"require-dev": {
16-
"fzaninotto/faker": "~1.0"
17-
},
1815
"autoload": {
1916
"psr-4": { "MongoDB\\": "src/" }
2017
},

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/FixtureGenerator.php

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

0 commit comments

Comments
 (0)