Skip to content

Commit d45647a

Browse files
committed
handle removal of setMethods
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
1 parent 62d08f9 commit d45647a

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/Phinx/Config/ConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public function testIsVersionOrderCreationTime($versionOrder, $expected)
313313
{
314314
// get config stub
315315
$configStub = $this->getMockBuilder('\Phinx\Config\Config')
316-
->setMethods(['getVersionOrder'])
316+
->onlyMethods(['getVersionOrder'])
317317
->setConstructorArgs([[]])
318318
->getMock();
319319

tests/Phinx/Db/Adapter/ProxyAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function setUp(): void
2020
{
2121
$stub = $this->getMockBuilder('\Phinx\Db\Adapter\PdoAdapter')
2222
->setConstructorArgs([[]])
23-
->setMethods([])
23+
->onlyMethods([])
2424
->getMock();
2525

2626
$stub->expects($this->any())

tests/Phinx/Migration/Manager/EnvironmentTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function testExecutingAMigrationUp()
150150
// up
151151
$upMigration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
152152
->setConstructorArgs(['mockenv', '20110301080000'])
153-
->setMethods(['up'])
153+
->onlyMethods(['up'])
154154
->getMock();
155155
$upMigration->expects($this->once())
156156
->method('up');
@@ -173,7 +173,7 @@ public function testExecutingAMigrationDown()
173173
// down
174174
$downMigration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
175175
->setConstructorArgs(['mockenv', '20110301080000'])
176-
->setMethods(['down'])
176+
->onlyMethods(['down'])
177177
->getMock();
178178
$downMigration->expects($this->once())
179179
->method('down');
@@ -202,7 +202,7 @@ public function testExecutingAMigrationWithTransactions()
202202
// migrate
203203
$migration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
204204
->setConstructorArgs(['mockenv', '20110301080000'])
205-
->setMethods(['up'])
205+
->onlyMethods(['up'])
206206
->getMock();
207207
$migration->expects($this->once())
208208
->method('up');
@@ -225,7 +225,7 @@ public function testExecutingAChangeMigrationUp()
225225
// migration
226226
$migration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
227227
->setConstructorArgs(['mockenv', '20130301080000'])
228-
->setMethods(['change'])
228+
->onlyMethods(['change'])
229229
->getMock();
230230
$migration->expects($this->once())
231231
->method('change');
@@ -248,7 +248,7 @@ public function testExecutingAChangeMigrationDown()
248248
// migration
249249
$migration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
250250
->setConstructorArgs(['mockenv', '20130301080000'])
251-
->setMethods(['change'])
251+
->onlyMethods(['change'])
252252
->getMock();
253253
$migration->expects($this->once())
254254
->method('change');
@@ -271,7 +271,7 @@ public function testExecutingAFakeMigration()
271271
// migration
272272
$migration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
273273
->setConstructorArgs(['mockenv', '20130301080000'])
274-
->setMethods(['change'])
274+
->onlyMethods(['change'])
275275
->getMock();
276276
$migration->expects($this->never())
277277
->method('change');
@@ -303,7 +303,7 @@ public function testExecuteMigrationCallsInit()
303303
// up
304304
$upMigration = $this->getMockBuilder('\Phinx\Migration\AbstractMigration')
305305
->setConstructorArgs(['mockenv', '20110301080000'])
306-
->setMethods(['up', 'init'])
306+
->onlyMethods(['up', 'init'])
307307
->getMock();
308308
$upMigration->expects($this->once())
309309
->method('up');
@@ -324,7 +324,7 @@ public function testExecuteSeedInit()
324324

325325
// up
326326
$seed = $this->getMockBuilder('\Phinx\Seed\AbstractSeed')
327-
->setMethods(['run', 'init'])
327+
->onlyMethods(['run', 'init'])
328328
->getMock();
329329

330330
$seed->expects($this->once())

0 commit comments

Comments
 (0)