This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'noopable/hotfix-di-classdefinition' into release
- Loading branch information
Showing
5 changed files
with
110 additions
and
3 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
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,35 @@ | ||
<?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_Di | ||
*/ | ||
|
||
namespace ZendTest\Di; | ||
|
||
use Zend\Di\DefinitionList; | ||
use Zend\Di\Definition\ClassDefinition; | ||
use Zend\Di\Definition\RuntimeDefinition; | ||
|
||
use PHPUnit_Framework_TestCase as TestCase; | ||
|
||
class DefinitionListTest extends TestCase | ||
{ | ||
public function testGetClassSupertypes() | ||
{ | ||
$definitionClassA = new ClassDefinition("A"); | ||
$superTypesA = array("superA"); | ||
$definitionClassA->setSupertypes($superTypesA); | ||
|
||
$definitionClassB = new ClassDefinition("B"); | ||
$definitionClassB->setSupertypes(array("superB")); | ||
|
||
$definitionList = new DefinitionList(array($definitionClassA, $definitionClassB)); | ||
|
||
$this->assertEquals($superTypesA, $definitionList->getClassSupertypes("A")); | ||
|
||
} | ||
} |