示例#1
0
 public function testSettingAlternateWithTooFewArgsRaisesException()
 {
     try {
         $this->helper->setAlternate('foo');
         $this->fail('Setting alternate with fewer than 3 args should raise exception');
     } catch (Zend_View_Exception $e) { }
     try {
         $this->helper->setAlternate('foo', 'bar');
         $this->fail('Setting alternate with fewer than 3 args should raise exception');
     } catch (Zend_View_Exception $e) { }
 }
示例#2
0
 public function testSetAlternateWithExtras()
 {
     $this->helper->setAlternate('/mydocument.pdf', 'application/pdf', 'foo', array('media' => array('print', 'screen')));
     $test = $this->helper->toString();
     $this->assertContains('media="print,screen"', $test);
 }