lithium\tests\mocks\data\source\database\adapter\MockMySql::get PHP Method

get() public method

public get ( $var )
    public function get($var)
    {
        return $this->{$var};
    }

Usage Example

Beispiel #1
0
 /**
  * Tests that the object is initialized with the correct default values.
  */
 public function testConstructorDefaults()
 {
     $db = new MockMySql(array('autoConnect' => false));
     $result = $db->get('_config');
     $expected = array('autoConnect' => false, 'encoding' => null, 'persistent' => true, 'host' => 'localhost:3306', 'login' => 'root', 'password' => '', 'database' => null, 'dsn' => null, 'options' => array(), 'init' => true);
     $this->assertEqual($expected, $result);
 }