Example #1
0
 /**
  * @covers \thebuggenie\core\framework\Context::isInstallmode
  * @covers \thebuggenie\core\framework\Context::checkInstallMode
  */
 public function testInstallMode()
 {
     $installed_file = THEBUGGENIE_PATH . 'installed';
     if (file_exists($installed_file)) {
         unlink($installed_file);
     }
     \thebuggenie\core\framework\Context::checkInstallMode();
     $this->assertTrue(\thebuggenie\core\framework\Context::isInstallmode());
     file_put_contents($installed_file, \thebuggenie\core\framework\Settings::getMajorVer() . "." . \thebuggenie\core\framework\Settings::getMinorVer() . "." . \thebuggenie\core\framework\Settings::getRevision() . ", installed today");
     \thebuggenie\core\framework\Context::checkInstallMode();
     $this->assertFalse(\thebuggenie\core\framework\Context::isInstallmode());
 }