/** * Tests the getTable method. * * @expectedException Exception * @todo Implement actual testing for an instantiated JTable class. * * @since 12.3 * * @return void */ public function testGetTable() { // Try to get a non-existent table $this->fixture->getTable(); }
/** * Method to get a table object, load it if necessary. * * @param string $name The table name. Optional. * @param string $prefix The class prefix. Optional. * @param array $options Configuration array for model. Optional. * * @return JTable A JTable object */ public function getTable($name = '', $prefix = 'K2Table', $options = array()) { require_once JPATH_ADMINISTRATOR . '/components/com_k2/tables/table.php'; K2Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_k2/tables'); return parent::getTable($name, $prefix, $options); }
/** * Tests the getTable method. * * @since 12.3 * * @return void * * @testdox getTable() returns JTable object */ public function testGetTableReturnsJtableObject() { $this->assertInstanceOf('JTableAsset', $this->fixture->getTable('Asset', 'JTable')); }
/** * Method to get a table object, load it if necessary. * * @param string $name The table name. Optional. * @param string $prefix The class prefix. Optional. * @param array $options Configuration array for model. Optional. * * @return JTable A JTable object * * @since 12.2 * @throws Exception */ public function getTable($name = 'Authentications', $prefix = 'Hs_usersTable', $options = array()) { return parent::getTable($name, $prefix, $options); }