public function testSumWorks() { $this->collection[] = (object) array('prop' => 1); $this->collection[] = (object) array('prop' => 2); $this->assertSame(3, $this->collection->sum('prop')); }