Exemplo n.º 1
0
 /**
  * test setting unknown type
  * expected new type
  */
 public function testCooking_WeightSetTypeFailed()
 {
     try {
         $value = new Zend_Measure_Cooking_Weight('-100', Zend_Measure_Cooking_Weight::STANDARD, 'de');
         $value->setType('Cooking_Weight::UNKNOWN');
         $this->fail('Exception expected because of unknown type');
     } catch (Zend_Measure_Exception $e) {
         // success
     }
 }
Exemplo n.º 2
0
 /**
  * test setting unknown type
  * expected new type
  */
 public function testCooking_WeightSetTypeFailed()
 {
     try {
         $value = new Zend_Measure_Cooking_Weight('-100', Zend_Measure_Cooking_Weight::STANDARD, 'de');
         $value->setType('Cooking_Weight::UNKNOWN');
         $this->assertTrue(false, 'Exception expected because of unknown type');
     } catch (Exception $e) {
         return true;
         // OK
     }
 }