@@ -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