This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing registration of abstract service factories within the DiFact…
…ory since it will only cause problems with cyclic dependencies
- Loading branch information
Showing
3 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_ServiceManager | ||
*/ | ||
|
||
namespace ZendTest\Mvc\Service; | ||
|
||
use Zend\Mvc\Service\DiFactory; | ||
use Zend\ServiceManager\ServiceManager; | ||
|
||
class DiFactoryTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testWillInitializeDiAndDiAbstractFactoryAndDiInitializer() | ||
{ | ||
$serviceManager = new ServiceManager(); | ||
$serviceManager->setService('Config', array('di' => array(''))); | ||
$serviceManager->setFactory('Di', new DiFactory()); | ||
|
||
$di = $serviceManager->get('Di'); | ||
$this->assertInstanceOf('Zend\Di\Di', $di); | ||
} | ||
} |