public function testToString() { $types = array('test' => MW_DB_Statement_Abstract::PARAM_STR, 'test()' => MW_DB_Statement_Abstract::PARAM_STR); $translations = array('test()' => 'testfunc($1,$2)'); $object = new MW_Common_Criteria_Expression_Sort_SQL($this->_conn, '-', 'test'); $this->assertEquals('test DESC', $object->toString($types)); $object = new MW_Common_Criteria_Expression_Sort_SQL($this->_conn, '+', 'test(1,2.1)'); $this->assertEquals('testfunc(1,2.1) ASC', $object->toString($types, $translations)); $object = new MW_Common_Criteria_Expression_Sort_SQL($this->_conn, '-', 'test("a",2)'); $this->assertEquals('testfunc(\'a\',2) DESC', $object->toString($types, $translations)); }