예제 #1
0
 def test_apply_config_writes_template_to_hypernode_ini(self):
     phpini.apply_config(self.fixture)
     self.mock_writefile.assert_called_once_with("/etc/php5/mods-available/hypernode.ini",
                                                 self.mock_template_contents)
     self.mock_filltemplate.assert_called_once_with("/etc/hypernode/templates/20.phpini",
                                                    {"options": {"apc.stat": 1},
                                                     "extensions": {"ioncube": True}})
예제 #2
0
 def test_apply_config_enables_hypernode_ini_restarts_phpfpm(self):
     phpini.apply_config(self.fixture)
     self.mock_call.assert_has_calls([
         mock.call(["php5enmod", "hypernode/99"]),
         mock.call(["service", "php5-fpm", "restart"])
     ])
예제 #3
0
 def test_apply_config_checks_phpoptions(self):
     phpini.apply_config(self.fixture)
     self.mock_checkvars.assert_called_once_with(self.fixture, ["php_options"])