protected function populateTable11()
 {
     Table11Peer::doDeleteAll();
     $t1 = new Table11();
     $t1->setRank(1);
     $t1->setTitle('row1');
     $t1->save();
     $t2 = new Table11();
     $t2->setRank(4);
     $t2->setTitle('row4');
     $t2->save();
     $t3 = new Table11();
     $t3->setRank(2);
     $t3->setTitle('row2');
     $t3->save();
     $t4 = new Table11();
     $t4->setRank(3);
     $t4->setTitle('row3');
     $t4->save();
 }
 /**
  * @expectedException PropelException
  */
 public function testMoveToNewObject()
 {
     $t = new Table11();
     $t->moveToRank(2);
 }
 public function testGetMaxRank()
 {
     $this->assertEquals(4, Table11Query::create()->getMaxRank(), 'getMaxRank() returns the maximum rank');
     // delete one
     $t4 = Table11Query::create()->findOneByRank(4);
     $t4->delete();
     $this->assertEquals(3, Table11Query::create()->getMaxRank(), 'getMaxRank() returns the maximum rank');
     // add one
     $t = new Table11();
     $t->save();
     $this->assertEquals(4, Table11Query::create()->getMaxRank(), 'getMaxRank() returns the maximum rank');
     // delete all
     Table11Query::create()->deleteAll();
     $this->assertNull(Table11Query::create()->getMaxRank(), 'getMaxRank() returns null for empty tables');
     // add one
     $t = new Table11();
     $t->save();
     $this->assertEquals(1, Table11Query::create()->getMaxRank(), 'getMaxRank() returns the maximum rank');
 }