public function testGetAllVersions()
 {
     $o = new \VersionableBehaviorTest1();
     $versions = $o->getAllVersions();
     $this->assertTrue($versions->isEmpty());
     $o->setBar(123);
     // version 1
     $o->save();
     $o->setBar(456);
     // version 2
     $o->save();
     $versions = $o->getAllVersions();
     $this->assertTrue($versions instanceof ObjectCollection);
     $this->assertEquals(2, $versions->count());
     $this->assertEquals(1, $versions[0]->getVersion());
     $this->assertEquals(123, $versions[0]->getBar());
     $this->assertEquals(2, $versions[1]->getVersion());
     $this->assertEquals(456, $versions[1]->getBar());
 }
 public function testGetLastVersions()
 {
     $o = new VersionableBehaviorTest1();
     $versions = $o->getAllVersions();
     $this->assertTrue($versions->isEmpty());
     $o->setBar(123);
     // version 1
     $o->save();
     $o->setBar(456);
     // version 2
     $o->save();
     $o->setBar(789);
     // version 3
     $o->save();
     $o->setBar(101112);
     // version 4
     $o->save();
     $versions = $o->getLastVersions();
     $this->assertTrue($versions instanceof PropelObjectCollection);
     $this->assertEquals(4, $versions->count());
     $this->assertEquals(4, $versions[0]->getVersion());
     $this->assertEquals(101112, $versions[0]->getBar());
     $this->assertEquals(3, $versions[1]->getVersion());
     $this->assertEquals(789, $versions[1]->getBar());
     $this->assertEquals(2, $versions[2]->getVersion());
     $this->assertEquals(456, $versions[2]->getBar());
     $this->assertEquals(1, $versions[3]->getVersion());
     $this->assertEquals(123, $versions[3]->getBar());
     $versions = $o->getLastVersions(2);
     $this->assertTrue($versions instanceof PropelObjectCollection);
     $this->assertEquals(2, $versions->count());
     $this->assertEquals(4, $versions[0]->getVersion());
     $this->assertEquals(101112, $versions[0]->getBar());
     $this->assertEquals(3, $versions[1]->getVersion());
     $this->assertEquals(789, $versions[1]->getBar());
 }