/** * Tests the JDatabaseQuery::quoteName method for an expected exception. * * @return void * * @expectedException RuntimeException * @since 11.3 */ public function testQuoteNameException() { $q = new JDatabaseQueryInspector($this->dbo); // Override the internal database for testing. $q->db = new stdClass(); $q->quoteName('foo'); }
/** * Tests the quoteName method. * * @return void * * @since 11.1 */ public function testQuoteName() { $q = new JDatabaseQueryInspector($this->dbo); $this->assertThat($q->quoteName("test"), $this->equalTo("`test`"), 'The quoteName method should be a proxy for the JDatabase::escape method.'); }