Skip to content

Instantly share code, notes, and snippets.

@a-suenami
Created August 15, 2012 08:02
Show Gist options
  • Save a-suenami/3357505 to your computer and use it in GitHub Desktop.
Save a-suenami/3357505 to your computer and use it in GitHub Desktop.
Ethna_DB_Mock
<?php
function setUp()
{
$this->manager = $this->backend->getManager($this->manager_name);
// DBをモックに差し替え
require_once 'Ethna/test/DB/Ethna_DB_PDO_Test.php';
$db = $this->manager->db;
$this->manager->db = new Ethna_DB_PDO_Mock($this->ctl, $db->getDSN(), $db->persistent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment