mirror of
https://github.com/php/php-src.git
synced 2025-01-10 04:54:47 +08:00
Fix tests (use a in-memory database not a file called memory)
This commit is contained in:
parent
a1775daba1
commit
8715eb0afa
@ -7,7 +7,7 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$x = $db->query('select 1 as queryString');
|
||||
var_dump($x, $x->queryString);
|
||||
|
@ -7,7 +7,7 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$x = $db->query('select 1 as queryStringxx');
|
||||
$y = $x->fetch(PDO::FETCH_LAZY);
|
||||
|
@ -7,7 +7,7 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$x= $db->prepare('select :a, :b, ?');
|
||||
$x->bindValue(':a', 1, PDO::PARAM_INT);
|
||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing sqliteCreateAggregate()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)');
|
||||
|
||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing sqliteCreateFunction()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)');
|
||||
|
||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing lastInsertId()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
$db->query('CREATE TABLE IF NOT EXISTS foo (id INT AUTO INCREMENT, name TEXT)');
|
||||
$db->query('INSERT INTO foo VALUES (NULL, "PHP")');
|
||||
$db->query('INSERT INTO foo VALUES (NULL, "PHP6")');
|
||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing transaction
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$db = new pdo('sqlite:memory');
|
||||
$db = new pdo('sqlite::memory:');
|
||||
|
||||
$db->beginTransaction();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user