public function testGetMaxRank()
 {
     $this->assertEquals(4, Table11Peer::getMaxRank(), 'getMaxRank() returns the maximum rank');
     $t4 = Table11Peer::retrieveByRank(4);
     $t4->delete();
     $this->assertEquals(3, Table11Peer::getMaxRank(), 'getMaxRank() returns the maximum rank');
     Table11Peer::doDeleteAll();
     $this->assertNull(Table11Peer::getMaxRank(), 'getMaxRank() returns null for empty tables');
 }
 public function testPreDelete()
 {
     $max = Table11Peer::getMaxRank();
     $t3 = Table11Peer::retrieveByRank(3);
     $t3->delete();
     $this->assertEquals($max - 1, Table11Peer::getMaxRank(), 'Sortable rearrange subsequent rows on delete');
     $c = new Criteria();
     $c->add(Table11Peer::TITLE, 'row4');
     $t4 = Table11Peer::doSelectOne($c);
     $this->assertEquals(3, $t4->getRank(), 'Sortable rearrange subsequent rows on delete');
 }