diff --git a/core/tests/AdminTest.php b/core/tests/AdminTest.php index e047d07f..6950c32b 100644 --- a/core/tests/AdminTest.php +++ b/core/tests/AdminTest.php @@ -29,6 +29,7 @@ public function setUp() // Load the service config file, which is in YAML format $loader->load('../services.yml'); // Get objects from container + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); $this->config = $this->container->get('Config'); $this->admin = $this->container->get('Admin'); diff --git a/core/tests/ListManagerTest.php b/core/tests/ListManagerTest.php index e6306999..c0f9496e 100644 --- a/core/tests/ListManagerTest.php +++ b/core/tests/ListManagerTest.php @@ -27,7 +27,7 @@ public function setUp() // Load the service config file, which is in YAML format $loader->load('../services.yml'); // Set necessary config class parameter - $this->container->setParameter('config.configfile', '/var/www/pl4/config.ini'); + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); // Get objects from container $this->scrEntity = $this->container->get('SubscriberEntity'); $this->listManager = $this->container->get('ListManager'); diff --git a/core/tests/ListModelTest.php b/core/tests/ListModelTest.php index 322d676e..fa05553e 100644 --- a/core/tests/ListModelTest.php +++ b/core/tests/ListModelTest.php @@ -26,7 +26,7 @@ public function setUp() // Load the service config file, which is in YAML format $loader->load('../services.yml'); // Set necessary config class parameter - $this->container->setParameter('config.configfile', '/var/www/pl4/config.ini'); + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); // Get objects from container $this->listModel = $this->container->get('ListModel'); } diff --git a/core/tests/PassTest.php b/core/tests/PassTest.php index a0dc4f94..0062d90a 100644 --- a/core/tests/PassTest.php +++ b/core/tests/PassTest.php @@ -20,6 +20,7 @@ public function setUp() $loader = new YamlFileLoader($this->container, new FileLocator(__DIR__)); // Load the service config file, which is in YAML format $loader->load('../services.yml'); + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); // Get objects from container $this->pass = $this->container->get('Pass'); // Set default pwd for testing diff --git a/core/tests/ServicesTest.php b/core/tests/ServicesTest.php index 918e037e..5bbc0877 100644 --- a/core/tests/ServicesTest.php +++ b/core/tests/ServicesTest.php @@ -27,20 +27,15 @@ public function setUp() $loader = new YamlFileLoader($this->container, new FileLocator(__DIR__)); // Load the service config file, which is in YAML format $loader->load('../services.yml'); + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); } public function testConfigService() { - // Set service parameters - $this->container->setParameter('config.configfile', '/var/www/pl4/config.ini'); - $config = $this->container->get('Config'); } public function testPhplistService() { - // Set service parameters - $this->container->setParameter('config.configfile', '/var/www/pl4/config.ini'); - $config = $this->container->get('phpList'); } } diff --git a/core/tests/SubscriberManagerTest.php b/core/tests/SubscriberManagerTest.php index 186e3398..bfb8fb54 100644 --- a/core/tests/SubscriberManagerTest.php +++ b/core/tests/SubscriberManagerTest.php @@ -45,6 +45,7 @@ public function setUp() $loader = new YamlFileLoader($this->container, new FileLocator(__DIR__)); // Load the service config file, which is in YAML format $loader->load('../services.yml'); + $this->container->setParameter('config.configfile', __DIR__ . '/../../config.ini.dist'); $this->subscriberManager = $this->container->get('SubscriberManager'); } diff --git a/core/tests/SubscriberModelTest.php b/core/tests/SubscriberModelTest.php index a9e29754..1a5c10ec 100644 --- a/core/tests/SubscriberModelTest.php +++ b/core/tests/SubscriberModelTest.php @@ -29,7 +29,7 @@ public function setUp() $this->plainPass = 'easypassword'; // Instantiate config object - $this->configFile = dirname(__FILE__) . '/../../config.ini'; + $this->configFile = __DIR__ . '/../../config.ini.dist'; $this->config = new Config($this->configFile); // Instantiate remaining classes diff --git a/core/tests/phpunit-bootstrap.php b/core/tests/phpunit-bootstrap.php index 638b5c22..5c14296e 100644 --- a/core/tests/phpunit-bootstrap.php +++ b/core/tests/phpunit-bootstrap.php @@ -1,6 +1,6 @@