public function testGetRowData() { $db = JFactory::getDbo(); $db->setQuery('SELECT * FROM ' . $db->quoteName('#__users') . ' WHERE ' . $db->quoteName('id') . ' = ' . (int) 42); $arrayFromQuery = $db->loadAssoc(); $testTable = new JTableUser(self::$driver); $testTable->load(42); $arrayFromMethod = $this->object->getRowData($testTable); $this->assertEquals($arrayFromQuery, $arrayFromMethod); }
/** * Gets a row of data from a table * * @param JTable $table JTable instance for a row. * * @return array Associative array of all columns and values for a row in a table. * * @since 3.1 */ public function getRowData(JTable $table) { $data = new JHelper(); return $data->getRowData($table); }