Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iwalz committed Jan 5, 2013
1 parent c83ce7f commit 8ffbe25
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/ZendTest/Stdlib/HydratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,9 @@ public function testHydratorClassMethodsWithServiceManager()
{
$hydrator = new ClassMethods(false);
$datas = $hydrator->extract($this->classMethodsInvalidParameter);

$this->assertTrue($datas['hasBar']);
$this->assertEquals('Bar', $datas['foo']);
$this->assertFalse($datas['isBla']);
}
}
25 changes: 25 additions & 0 deletions tests/ZendTest/Stdlib/TestAsset/ClassMethodsInvalidParameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,29 @@ public function hasAlias($alias)
{
return $alias;
}

public function getTest($foo)
{
return $foo;
}

public function isTest($bar)
{
return $bar;
}

public function hasBar()
{
return true;
}

public function getFoo()
{
return "Bar";
}

public function isBla()
{
return false;
}
}

0 comments on commit 8ffbe25

Please sign in to comment.