public function testExecutingAChangeMigrationDown() { // stub adapter $adapterStub = $this->getMock('\\Phinx\\Db\\Adapter\\PdoAdapter', array(), array(array())); $adapterStub->expects($this->once())->method('migrated')->will($this->returnArgument(0)); $this->environment->setAdapter($adapterStub); // migration $migration = $this->getMock('\\Phinx\\Migration\\AbstractMigration', array('change'), array('20130301080000')); $migration->expects($this->once())->method('change'); $this->environment->executeMigration($migration, MigrationInterface::DOWN); }
protected function setUp() { parent::setUp(); $this->environment = new Environment('test', []); $this->environment->setAdapter($this->adapter); }