Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vegner committed Aug 2, 2017
1 parent 5262831 commit bc502b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public function __construct($value) {
}

public function getValue() {
return $value;
return $this->value;
}
}
9 changes: 9 additions & 0 deletions tests/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
use SD\DependencyInjection\Exception;

class ContainerTest extends TestCase {
public function testRegisterValue() {
$container = new Container();
$name = 'name';
$value = new \stdClass();
$container->register($name, $container->value($value));
$result = $container->get($name);
$this->assertEquals($value, $result, 'Must return wrapped value as is');
}

public function testRegisterClassName() {
$name = 'Padme';
$container = new Container(
Expand Down

0 comments on commit bc502b6

Please sign in to comment.