public function testRetrieveByRank()
 {
     $t = SortableTable11Query::retrieveByRank(5);
     $this->assertNull($t, 'retrieveByRank() returns null for an unknown rank');
     $t3 = SortableTable11Query::retrieveByRank(3);
     $this->assertEquals(3, $t3->getRank(), 'retrieveByRank() returns the object with the required rank');
     $this->assertEquals('row3', $t3->getTitle(), 'retrieveByRank() returns the object with the required rank');
 }
 public function testRemoveFromList()
 {
     $t2 = SortableTable11Query::retrieveByRank(2);
     $res = $t2->removeFromList();
     $this->assertTrue($res instanceof Table11, 'removeFromList() returns the current object');
     $this->assertNull($res->getRank(), 'removeFromList() resets the object\'s rank');
     SortableTable11TableMap::clearInstancePool();
     $expected = array(1 => 'row1', 2 => 'row2', 3 => 'row3', 4 => 'row4');
     $this->assertEquals($expected, $this->getFixturesArray(), 'removeFromList() does not change the list until the object is saved');
     $t2->save();
     SortableTable11TableMap::clearInstancePool();
     $expected = array(null => 'row2', 1 => 'row1', 2 => 'row3', 3 => 'row4');
     $this->assertEquals($expected, $this->getFixturesArray(), 'removeFromList() changes the list once the object is saved');
 }