Exemplo n.º 1
0
 public function testInstalledPluginSettingsFileWillNotBeOverrridenOnLoad()
 {
     $starter = new PluginStarter();
     $starter->load('PluginInstallerTest');
     $installedSettingsFile = new File(ROOT . DS . 'config' . DS . 'Plugins' . DS . 'PluginInstallerTest' . DS . 'settings.php');
     $defaultSettingsFile = new File(ROOT . DS . 'plugins' . DS . 'PluginInstallerTest' . DS . 'config' . DS . 'default_settings.php');
     $installedSettingsFile->write("<?php \n\t\t\treturn [\n\t\t\t\t'MyApplication.Modules.PluginInstallerTest.Settings' => \n\t\t\t\t\t['Default' => false]\n\t\t\t\t]; \n\t\t?>");
     $installedSettingsFile->close();
     $starter->load('PluginInstallerTest');
     $installedSettingsFile = new File(ROOT . DS . 'config' . DS . 'Plugins' . DS . 'PluginInstallerTest' . DS . 'settings.php');
     $this->assertEquals(strcmp($installedSettingsFile->md5(), $defaultSettingsFile->md5()) === 0, false);
     $installedSettingsFile->close();
     $defaultSettingsFile->close();
 }