Skip to content

Commit

Permalink
Update container test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljennings committed Oct 6, 2015
1 parent fad1334 commit 2295ffa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Nexus/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ public function testIterationReturnsItems()
}
}

public function testContainerActsLikeArray()
{
$container = $this->makeContainer();

$this->assertTrue(isset($container[0]));
$this->assertFalse(isset($container[5]));

$container['test'] = 'hello world';

$this->assertEquals('hello world', $container['test']);

$this->assertTrue(isset($container['test']));

unset($container['test']);

$this->assertFalse(isset($container['test']));
}

protected function makeContainer()
{
return new Container($this->getData(), $this->getConfig(), 'Michaeljennings\Carpenter\Wrappers\ArrayWrapper');
Expand Down

0 comments on commit 2295ffa

Please sign in to comment.