/** * test getConversionList * expected array */ public function testLengthConversionList() { $value = new Zend_Measure_Length('-100', Zend_Measure_Length::STANDARD, 'de'); $unit = $value->getConversionList(); $this->assertTrue(is_array($unit), 'Array expected'); }
/** * Get name of measure by its type * * @param $key * @return string */ public function getMeasureDimensionName($key) { $weight = new Zend_Measure_Length(0); $conversionList = $weight->getConversionList(); if (!empty($conversionList[$key]) && !empty($conversionList[$key][1])) { return $conversionList[$key][1]; } return ''; }