Fix incorrect test naming
`tesOverrideService()` was incorrect and wasn't getting called by PHPUnit. Also, the unit test itself was wrong, but went unnoticed because of point 1.
This commit is contained in:
parent
22fd04eb41
commit
0223221a64
1 changed files with 2 additions and 4 deletions
|
@ -136,8 +136,7 @@ class SimpleContainerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function tesOverrideService() {
|
public function testOverrideService() {
|
||||||
$this->container->registerParameter('test', 'abc');
|
|
||||||
$this->container->registerService(
|
$this->container->registerService(
|
||||||
'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) {
|
'Test\AppFramework\Utility\IInterfaceConstructor', function ($c) {
|
||||||
return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor');
|
return $c->query('Test\AppFramework\Utility\ClassSimpleConstructor');
|
||||||
|
@ -147,10 +146,9 @@ class SimpleContainerTest extends \Test\TestCase {
|
||||||
return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor');
|
return $c->query('Test\AppFramework\Utility\ClassEmptyConstructor');
|
||||||
});
|
});
|
||||||
$object = $this->container->query(
|
$object = $this->container->query(
|
||||||
'Test\AppFramework\Utility\ClassInterfaceConstructor'
|
'Test\AppFramework\Utility\IInterfaceConstructor'
|
||||||
);
|
);
|
||||||
$this->assertTrue($object instanceof ClassEmptyConstructor);
|
$this->assertTrue($object instanceof ClassEmptyConstructor);
|
||||||
$this->assertEquals('abc', $object->test);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRegisterAliasParamter() {
|
public function testRegisterAliasParamter() {
|
||||||
|
|
Loading…
Reference in a new issue