Skip to content

Commit

Permalink
WIP:added config library
Browse files Browse the repository at this point in the history
  • Loading branch information
gr8abbasi committed Oct 23, 2016
1 parent 68d488a commit f98fb65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/ServiceLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Gr8abbasi\Container;

use Mcustiel\Config\Drivers\Reader\php\Reader;
use Mcustiel\Config\ConfigLoader;

/**
* Class ServiceLoader
*
Expand All @@ -23,6 +26,10 @@ public function loadServices($filePath)
/**
* REMOVE ME AND ADD LIBRARY CODE HERE
*/
$loader = new ConfigLoader($filePath, new Reader());
$config = $loader->load();
// var_dump($config);exit;

$this->services = ['hello'];
return $this->services;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ServiceLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function isInstanceOfServiceLoader()
*/
public function canLoadServicesFromConfigFile()
{
$services = $this->serviceLoader->loadServices('SomeFilePath');
$services = $this->serviceLoader->loadServices(__DIR__ . "/DummyServices/phpServicesConfig.php");

$this->assertNotNull($services);
$this->assertNotEmpty($services);
Expand Down

0 comments on commit f98fb65

Please sign in to comment.