Skip to content

Commit 451f165

Browse files
committed
Stop using old Mongo classes polyfilled by the removed php-adapter library
1 parent 0c50cef commit 451f165

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/AntiMattr/Tests/MongoDB/Migrations/Configuration/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testGetCurrentVersion()
6565
->with('antimattr_migration_versions_test')
6666
->will($this->returnValue($collection));
6767

68-
$cursor = $this->buildMock('MongoCursor');
68+
$cursor = $this->buildMock('Doctrine\MongoDB\Cursor');
6969

7070
$in = ['v' => ['$in' => ['20140822185742', '20140822185743', '20140822185744']]];
7171

@@ -160,7 +160,7 @@ public function testGetNumberOfExecutedMigrations()
160160
->with('antimattr_migration_versions_test')
161161
->will($this->returnValue($collection));
162162

163-
$cursor = $this->buildMock('MongoCursor');
163+
$cursor = $this->buildMock('Doctrine\MongoDB\Cursor');
164164

165165
$collection->expects($this->once())
166166
->method('find')

tests/AntiMattr/Tests/MongoDB/Migrations/VersionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testConstructor()
5454
$this->assertNotNull($this->version->getMigration());
5555
}
5656

57-
public function testAnalyzeThrowsMongoException()
57+
public function testAnalyzeThrowsException()
5858
{
5959
$collection = $this->buildMock('Doctrine\MongoDB\Collection');
6060
$this->statistics->expects($this->once())
@@ -65,7 +65,7 @@ public function testAnalyzeThrowsMongoException()
6565
->method('getName')
6666
->will($this->returnValue('test_name'));
6767

68-
$expectedException = new \MongoException();
68+
$expectedException = new \RuntimeException();
6969

7070
$this->statistics->expects($this->once())
7171
->method('updateBefore')
@@ -176,14 +176,14 @@ public function testMarkNotMigrated()
176176
$this->version->markNotMigrated();
177177
}
178178

179-
public function testUpdateStatisticsAfterThrowsMongoException()
179+
public function testUpdateStatisticsAfterThrowsException()
180180
{
181181
$collection = $this->buildMock('Doctrine\MongoDB\Collection');
182182
$this->statistics->expects($this->once())
183183
->method('setCollection')
184184
->with($collection);
185185

186-
$expectedException = new \MongoException();
186+
$expectedException = new \RuntimeException();
187187

188188
$this->statistics->expects($this->once())
189189
->method('updateAfter')

0 commit comments

Comments
 (0)