Esempio n. 1
0
 public function testQparserDereferenced()
 {
     $this->assertEquals('{!join from=$deref_1 to=$deref_2}', $this->_helper->qparser('join', array('from' => 'manu_id', 'to' => 'id'), true));
     $this->assertEquals(array('deref_1' => 'manu_id', 'deref_2' => 'id'), $this->_query->getParams());
     // second call, params should have updated counts
     $this->assertEquals('{!join from=$deref_3 to=$deref_4}', $this->_helper->qparser('join', array('from' => 'cat_id', 'to' => 'prod_id'), true));
     // previous params should also still be there
     $this->assertEquals(array('deref_1' => 'manu_id', 'deref_2' => 'id', 'deref_3' => 'cat_id', 'deref_4' => 'prod_id'), $this->_query->getParams());
 }