public function testSetPrependAppendAndOffsetSetThrowExceptionsOnInvalidItems() { try { $this->helper->append('foo'); $this->fail('Append should throw exception with invalid item'); } catch (View\Exception\ExceptionInterface $e) { } try { $this->helper->offsetSet(1, 'foo'); $this->fail('OffsetSet should throw exception with invalid item'); } catch (View\Exception\ExceptionInterface $e) { } try { $this->helper->prepend('foo'); $this->fail('Prepend should throw exception with invalid item'); } catch (View\Exception\ExceptionInterface $e) { } try { $this->helper->set('foo'); $this->fail('Set should throw exception with invalid item'); } catch (View\Exception\ExceptionInterface $e) { } }
public function set($value) { $value->attributes['src'] = $this->appendCdn($value->attributes['src']); parent::set($value); }