public function testIsEven() { $col = new PropelCollection(); $this->assertTrue($col->isEven(), 'isEven() returns true on an empty collection'); $data = array('bar1', 'bar2', 'bar3'); $col = new PropelCollection(); $col->setData($data); foreach ($col as $key => $value) { $this->assertEquals(!(bool) ($key % 2), $col->isEven(), 'isEven() returns true only when the key is even'); } }