예제 #1
0
 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);
 }
예제 #2
0
 /**
  * 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);
 }