public function testElementsSum() { $array = CArray::fromElements(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $this->assertTrue(CArray::elementsSum($array) == 55); }
/** * Sums up all the elements in an array and returns the result. * * @return number The sum of all the elements in the array. */ public function elementsSum() { return CArray::elementsSum($this->m_splArray); }