From ffae05530f42e433e7429f5fd03b735e015b4955 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 30 Jun 2015 08:26:49 -0400 Subject: [PATCH] PHPLIB-108: Use MongoDB\BSON namespace prefix --- src/BulkWriteResult.php | 2 +- src/Model/IndexInput.php | 2 +- tests/Collection/BulkWriteFunctionalTest.php | 4 ++-- tests/Model/IndexInputTest.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BulkWriteResult.php b/src/BulkWriteResult.php index 2862a59cd..15117bdb6 100644 --- a/src/BulkWriteResult.php +++ b/src/BulkWriteResult.php @@ -2,7 +2,7 @@ namespace MongoDB; -use BSON\ObjectId; +use MongoDB\BSON\ObjectId; use MongoDB\Driver\WriteResult; /** diff --git a/src/Model/IndexInput.php b/src/Model/IndexInput.php index db4288992..3f55a3544 100644 --- a/src/Model/IndexInput.php +++ b/src/Model/IndexInput.php @@ -2,7 +2,7 @@ namespace MongoDB\Model; -use BSON\Serializable; +use MongoDB\BSON\Serializable; use MongoDB\Exception\InvalidArgumentException; use MongoDB\Exception\UnexpectedTypeException; diff --git a/tests/Collection/BulkWriteFunctionalTest.php b/tests/Collection/BulkWriteFunctionalTest.php index 29a80f644..c8a6def20 100644 --- a/tests/Collection/BulkWriteFunctionalTest.php +++ b/tests/Collection/BulkWriteFunctionalTest.php @@ -28,7 +28,7 @@ public function testInserts() $insertedIds = $result->getInsertedIds(); $this->assertSame(1, $insertedIds[0]); - $this->assertInstanceOf('BSON\ObjectId', $insertedIds[1]); + $this->assertInstanceOf('MongoDB\BSON\ObjectId', $insertedIds[1]); $expected = array( array('_id' => $insertedIds[0], 'x' => 11), @@ -58,7 +58,7 @@ public function testUpdates() $upsertedIds = $result->getUpsertedIds(); $this->assertSame(5, $upsertedIds[2]); - $this->assertInstanceOf('BSON\ObjectId', $upsertedIds[3]); + $this->assertInstanceOf('MongoDB\BSON\ObjectId', $upsertedIds[3]); $expected = array( array('_id' => 1, 'x' => 11), diff --git a/tests/Model/IndexInputTest.php b/tests/Model/IndexInputTest.php index 7b354a4d1..c3269313d 100644 --- a/tests/Model/IndexInputTest.php +++ b/tests/Model/IndexInputTest.php @@ -87,7 +87,7 @@ public function testBsonSerialization() 'ns' => 'foo.bar', )); - $this->assertInstanceOf('BSON\Serializable', $indexInput); + $this->assertInstanceOf('MongoDB\BSON\Serializable', $indexInput); $this->assertEquals($expected, $indexInput->bsonSerialize()); } }