FOF30\Database\Installer::setForcedFile PHP Method

setForcedFile() public method

Sets the absolute path to an XML schema file which will be read no matter what. Set to a blank string to let the Installer class auto-detect your schema file based on your database type.
public setForcedFile ( string $forcedFile )
$forcedFile string
    public function setForcedFile($forcedFile)
    {
        $this->forcedFile = $forcedFile;
    }

Usage Example

Esempio n. 1
0
 /**
  * @covers  FOF30\Database\Installer::__construct
  * @covers  FOF30\Database\Installer::updateSchema
  * @covers  FOF30\Database\Installer::findSchemaXml
  * @covers  FOF30\Database\Installer::openAndVerify
  * @covers  FOF30\Database\Installer::conditionMet
  *
  * @throws \Exception
  */
 public function testCanFail()
 {
     $db = static::$container->db;
     $installer = new Installer($db, __DIR__ . '/../_data/installer');
     $installer->setForcedFile(__DIR__ . '/../_data/installer/test_canfail.xml');
     $installer->updateSchema();
     // Required for PHPUnit to mark the test as complete
     $this->assertTrue(true);
 }