Merge remote branch 'lsmith77/getAllPrevious'

* lsmith77/getAllPrevious:
  renamed getPreviouses() to getAllPrevious
This commit is contained in:
Fabien Potencier 2011-04-24 08:46:54 +02:00
commit b906cb59b8
3 changed files with 7 additions and 7 deletions

View File

@ -19,11 +19,11 @@
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
</div>
{% set previous_count = exception.previouses|length %}
{% if previous_count %}
{% set previous_count = exception.allPrevious|length %}
{% if previous_count|length %}
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
<ul>
{% for i, previous in exception.previouses %}
{% for i, previous in exception.allPrevious %}
<li>
{{ previous.class|abbr_class }} <a href="#traces_link_{{ i + 1 }}" onclick="toggle('traces_{{ i + 1 }}', 'traces'); switchIcons('icon_traces_{{ i + 1 }}_open', 'icon_traces_{{ i + 1 }}_close');">&raquo;</a>
</li>

View File

@ -47,7 +47,7 @@ class FlattenException
public function toArray()
{
$exceptions = array();
foreach (array_merge(array($this), $this->getPreviouses()) as $exception) {
foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) {
$exceptions[] = array(
'message' => $exception->getMessage(),
'class' => $exception->getClass(),
@ -118,7 +118,7 @@ class FlattenException
$this->previous = $previous;
}
public function getPreviouses()
public function getAllPrevious()
{
$exceptions = array();
$e = $this;

View File

@ -42,7 +42,7 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
$this->assertSame($flattened2,$flattened->getPrevious());
$this->assertSame(array($flattened2),$flattened->getPreviouses());
$this->assertSame(array($flattened2),$flattened->getAllPrevious());
}
/**
@ -71,4 +71,4 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
array(new \Exception('test', 123), 500),
);
}
}
}