Skip to content

Commit

Permalink
Merge pull request #224 from samsonasik/assign-logs
Browse files Browse the repository at this point in the history
assign $expectation->logs() to variable in Specification::_specEnd()
  • Loading branch information
jails committed Feb 15, 2017
2 parents cf150eb + 331e2f1 commit b9396ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Specification.php
Expand Up @@ -185,10 +185,10 @@ protected function _specStart()
protected function _specEnd($runAfterEach = true)
{
foreach ($this->_expectations as $expectation) {
if (!$expectation->logs()) {
if (!($logs = $expectation->logs())) {
$this->log()->type('pending');
}
foreach ($expectation->logs() as $log) {
foreach ($logs as $log) {
$this->log($log['type'], $log);
}
}
Expand Down

0 comments on commit b9396ea

Please sign in to comment.