Skip to content

Commit

Permalink
add stubbles\input\errors\ParamError::details()
Browse files Browse the repository at this point in the history
  • Loading branch information
mikey179 committed Jun 17, 2015
1 parent 6dcca51 commit 57dc1c5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
5.1.0 (2015-06-17)
------------------

* added `stubbles\input\errors\ParamError::details()`


5.0.0 (2015-05-28)
------------------

Expand Down
12 changes: 12 additions & 0 deletions src/main/php/errors/ParamError.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ public function id()
return $this->id;
}

/**
* returns details of what caused the error
*
* @return array
* @since 5.1.0
* @XmlIgnore
*/
public function details()
{
return $this->details;
}

/**
* fills given list of messages with details
*
Expand Down
9 changes: 9 additions & 0 deletions src/test/php/errors/ParamErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public function returnsGivenId()
assertEquals('id', $this->paramError->id());
}

/**
* @test
* @since 5.1.0
*/
public function returnsGivenDetails()
{
assertEquals(['foo' => 'bar'], $this->paramError->details());
}

/**
* @test
*/
Expand Down

0 comments on commit 57dc1c5

Please sign in to comment.