getVersionByName() public method

Will return a version based in the migration name
public getVersionByName ( array $mapping ) : boolean | string
$mapping array mapping of all migrations.
return boolean | string
Esempio n. 1
0
 /**
  * TestGetVersionByName method
  *
  * @return void
  */
 public function testGetVersionByName()
 {
     $Version = new MigrationVersion(array('jumpTo' => '007_schema_dump'));
     $result = $Version->getVersionByName($this->_mapping());
     $this->assertEquals(7, $result);
     $Version = new MigrationVersion(array('jumpTo' => '00_schema_dump'));
     $result = $Version->getVersionByName($this->_mapping());
     $this->assertFalse($result);
 }