コード例 #1
0
ファイル: RepositoryTest.php プロジェクト: nocttuam/marvin
 public function testShouldSetValuesCorrectly()
 {
     $items = ['app' => 'Marvin', 'config' => 'Configuration', 'fixed' => 'Dont change'];
     $expected = ['app' => ['name' => 'Marvin', 'describe' => 'Manager Virtual Hosts'], 'config' => 'New Configurations', 'fixed' => 'Dont change'];
     $configRepository = new Repository($items);
     $configRepository->set('app.name', 'Marvin');
     $configRepository->set('app.describe', 'Manager Virtual Hosts');
     $configRepository->set('config', 'New Configurations');
     $this->assertEquals($expected, $configRepository->all());
 }
コード例 #2
0
ファイル: ApacheManager.php プロジェクト: nocttuam/marvin
 /**
  * Set name used to the configuration file
  *
  * @param $name
  */
 public function setFileName($name)
 {
     if (!preg_match('/(.conf)$/', $name)) {
         $name .= '.conf';
     }
     $this->configRepository->set('apache.file-name', $name);
 }