Login   Register  
PHP Classes
elePHPant
Icontem

File: unit_tests/Database/Connection.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Victor Bolshov  >  Naf Database Tools  >  unit_tests/Database/Connection.php  >  Download  
File: unit_tests/Database/Connection.php
Role: Unit test script
Content type: text/plain
Description: Naf_UnitTestDbConnection class - a helper for unit test cases
Class: Naf Database Tools
Store and retrieve objects in databases using PDO
Author: By
Last change:
Date: 7 years ago
Size: 283 bytes
 

Contents

Class file image Download
<?php

/**
 * A helper for database unit-tests
 */

class Naf_UnitTestDbConnection {
    
    
/**
     * @var PDO
     */
    
private $pdo;
    
    function 
__construct()
    {
        
$this->pdo = new PDO("sqlite:" dirname(__FILE__) . '/sqlite/db');
    }
    
    function 
getConnection()
    {
        return 
$this->pdo;
    }
}