Exemple #1
0
 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) {
     }
 }
Exemple #2
0
 public function set($value)
 {
     $value->attributes['src'] = $this->appendCdn($value->attributes['src']);
     parent::set($value);
 }