示例#1
0
 /**
  */
 public function testRemoveVersion()
 {
     $this->assertFalse($this->object->hasTable(PHIGRATE_TS_SCHEMA_TBL_NAME));
     $this->object->createSchemaVersionTable();
     $this->assertTrue($this->object->hasTable(PHIGRATE_TS_SCHEMA_TBL_NAME));
     $return = $this->object->setCurrentVersion('firstVersion');
     $this->assertTrue($return);
     $expected = array('version' => 'firstVersion');
     $actual = $this->object->selectOne('SELECT version FROM ' . PHIGRATE_TS_SCHEMA_TBL_NAME . ';');
     $this->assertEquals($expected, $actual);
     $return = $this->object->removeVersion('firstVersion');
     $this->assertTrue($return);
     $actual = $this->object->selectOne('SELECT version FROM ' . PHIGRATE_TS_SCHEMA_TBL_NAME . ';');
     $this->assertNull($actual);
 }