public function testIsOdd() { $col = new PropelCollection(); $this->assertFalse($col->isOdd(), 'isOdd() returns false 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->isOdd(), 'isOdd() returns true only when the key is odd'); } }