public function testCountRows()
 {
     $this->assertEquals(4, $this->_handler->countRows());
     $select = $this->_handler->getModel()->select();
     $select->whereEquals('firstname', array('Foo', 'Max'));
     $this->assertEquals($this->_handler->countRows($select), 2);
     $model = new Kwf_Model_FnF(array('columns' => array('id', 'firstname', 'lastname'), 'data' => array()));
     $handler = new Kwf_Srpc_Handler_Model(array('model' => $model));
     $this->assertEquals(0, $handler->countRows());
 }
Esempio n. 2
0
 public function getModel()
 {
     $extraParams = $this->getExtraParams();
     $this->_model = new Kwf_Model_DbWithConnection_ImportExport_Model(array('table' => $extraParams['table']));
     return parent::getModel();
 }