function testYearAsc() { $schemaGenerator = new VF_Schema_Generator(); $schemaGenerator->setSorting('year', 'asc'); $schema = new VF_Schema(); $this->assertEquals('asc', $schema->getSorting('year')); $vehicle1 = $this->createMMY('Honda', 'Civic', '1999'); $vehicle2 = $this->createMMY('Honda', 'Civic', '2000'); $vehicle3 = $this->createMMY('Honda', 'Civic', '2001'); $this->insertMappingMMY($vehicle1); $this->insertMappingMMY($vehicle2); $this->insertMappingMMY($vehicle3); $year = new VF_Level('year'); $actual = $year->listInUse(array('model' => $vehicle1->getLevel('model')->getId())); $this->assertEquals("1999", $actual[0]->getTitle(), 'should return years, in ASC order'); $this->assertEquals("2000", $actual[1]->getTitle(), 'should return years, in ASC order'); $this->assertEquals("2001", $actual[2]->getTitle(), 'should return years, in ASC order'); }