merge from master

This commit is contained in:
Antonio Spinelli
2014-05-02 12:33:44 -03:00
parent 9beb7d9a58
commit 14a9dfe7cf
16 changed files with 325 additions and 17 deletions

View File

@@ -26,22 +26,15 @@ class ServiceLocatorTest extends TestCase
public function setUp()
{
$this->serviceLocator = new ServiceLocator();
$this->logService = new LogService();
$this->serviceLocator = new ServiceLocator();
$this->logService = new LogService();
$this->databaseService = new DatabaseService();
}
public function testHasServices()
{
$this->serviceLocator->add(
'DesignPatterns\More\ServiceLocator\LogServiceInterface',
$this->logService
);
$this->serviceLocator->add(
'DesignPatterns\More\ServiceLocator\DatabaseServiceInterface',
$this->databaseService
);
$this->serviceLocator->add('DesignPatterns\More\ServiceLocator\LogServiceInterface', $this->logService);
$this->serviceLocator->add('DesignPatterns\More\ServiceLocator\DatabaseServiceInterface', $this->databaseService);
$this->assertTrue($this->serviceLocator->has('DesignPatterns\More\ServiceLocator\LogServiceInterface'));
$this->assertTrue($this->serviceLocator->has('DesignPatterns\More\ServiceLocator\DatabaseServiceInterface'));