Ejemplo n.º 1
0
 public function test_connection_info()
 {
     $info = ActiveRecord\Connection::parse_connection_url('mysql://*****:*****@127.0.0.1:3306/dbname');
     $this->assert_equals('mysql', $info->protocol);
     $this->assert_equals('user', $info->user);
     $this->assert_equals('pass', $info->pass);
     $this->assert_equals('127.0.0.1', $info->host);
     $this->assert_equals(3306, $info->port);
     $this->assert_equals('dbname', $info->db);
 }
 public function test_parse_connection_url_with_unix_sockets()
 {
     $info = ActiveRecord\Connection::parse_connection_url('mysql://*****:*****@unix(/tmp/mysql.sock)/database');
     $this->assert_equals('/tmp/mysql.sock', $info->host);
 }