Esempio n. 1
0
 public function test_parameters()
 {
     $frame = new Zend_Queue_Stomp_Frame();
     try {
         $frame->setAutoContentLength(array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->setHeader(array(), 1);
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->setHeader('testing', array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->getHeader(array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->setBody(array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->setCommand(array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->toFrame();
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $frame->fromFrame(array());
         $this->fail('Exception should have been thrown');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
 }