function test_one_or_more_grouped_exceptions_should_be_condensed_by_getRelated() { $int = new IntException(); $e = new AbstractGroupedException(); $e2 = new AbstractNestedException(); $e->addRelated($e2); $e2->addRelated($int); $result = $e->getRelated(); $this->assertSame($int, current($result)); }
public function testOneOrMoreGroupedExceptionsShouldBeCondensedByGetRelated() { $int = new IntException(); $e = new AbstractGroupedException(); $e2 = new AbstractNestedException(); $e->addRelated($e2); $e2->addRelated($int); $result = $e->getRelated(); $this->assertSame($int, current($result)); }
/** * {@inheritdoc} */ public function setParam($name, $value) { if ($name === 'keys') { $value = trim(json_encode($value), '[]'); } return parent::setParam($name, $value); }
/** * {@inheritdoc} */ public function chooseTemplate() { if ($this->getParam('keys')) { return static::STRUCTURE; } return parent::chooseTemplate(); }