コード例 #1
0
ファイル: Bootstrap.php プロジェクト: bix0r/Stjornvisi
            $table = new PHPUnit_Extensions_Database_DataSet_DefaultTable($metaData);
            foreach ($rows as $row) {
                $table->addRow($row);
            }
            $this->tables[$tableName] = $table;
        }
    }
    protected function createIterator($reverse = false)
    {
        return new PHPUnit_Extensions_Database_DataSet_DefaultTableIterator($this->tables, $reverse);
    }
    public function getTable($tableName)
    {
        if (!isset($this->tables[$tableName])) {
            throw new InvalidArgumentException("{$tableName} is not a table in the current database.");
        }
        return $this->tables[$tableName];
    }
}
class PDOMock extends \PDO
{
    public function __construct()
    {
    }
    public function prepare($statement, $driver_options = null)
    {
        throw new \PDOException();
    }
}
Bootstrap::init();