public function testMigratorOnlyExecutesCustomMigration() { $this->migrator->setMigrationType('custom'); $this->migrationRepository->expects($this->once())->method('getNextBatchNumber')->willReturn(1); $default = $this->getMockBuilder('\\DefaultTestMigration')->setMethods(array('up'))->getMock(); $default->expects($this->never())->method('up'); $custom = $this->getMockBuilder('\\CustomTestMigration')->setMethods(array('up'))->getMock(); $custom->expects($this->once())->method('up'); $this->setMigrationResolves(array(array('2015_03_05_012633_default_test_migration', $default), array('2015_03_05_012634_custom_test_migration', $custom))); $this->migrator->runMigrationList($this->migrationList); }