Esempio n. 1
0
 /**
  * 
  * Test -- Disallow all calls to methods besides factory() and the existing support methods.
  * 
  */
 public final function test__call()
 {
     // we use `new` instead of Solar::factory() so that we get back the
     // factory class itself, not an adapter generated by the factory
     $obj = new Solar_Sql($this->_config);
     try {
         $obj->noSuchMethod();
         $this->fail('__call() should not work');
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
 }
Esempio n. 2
0
 /**
  * 
  * Builds a part element **in place** using a 'select' source.
  * 
  * @param array &$parts The SELECT parts to build with.
  * 
  * @param string $name The subselect alias.
  * 
  * @param string $orig The subselect command string.
  * 
  * @return void
  * 
  */
 protected function _buildSelect(&$parts, $name, $orig)
 {
     $parts['from'][] = "({$orig}) " . $this->_sql->quoteName($name);
 }