mirror of
https://github.com/php/php-src.git
synced 2025-01-25 13:14:22 +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--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$db = new pdo('sqlite:memory');
|
$db = new pdo('sqlite::memory:');
|
||||||
|
|
||||||
$x = $db->query('select 1 as queryString');
|
$x = $db->query('select 1 as queryString');
|
||||||
var_dump($x, $x->queryString);
|
var_dump($x, $x->queryString);
|
||||||
|
@ -7,7 +7,7 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$db = new pdo('sqlite:memory');
|
$db = new pdo('sqlite::memory:');
|
||||||
|
|
||||||
$x = $db->query('select 1 as queryStringxx');
|
$x = $db->query('select 1 as queryStringxx');
|
||||||
$y = $x->fetch(PDO::FETCH_LAZY);
|
$y = $x->fetch(PDO::FETCH_LAZY);
|
||||||
|
@ -7,7 +7,7 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$db = new pdo('sqlite:memory');
|
$db = new pdo('sqlite::memory:');
|
||||||
|
|
||||||
$x= $db->prepare('select :a, :b, ?');
|
$x= $db->prepare('select :a, :b, ?');
|
||||||
$x->bindValue(':a', 1, PDO::PARAM_INT);
|
$x->bindValue(':a', 1, PDO::PARAM_INT);
|
||||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing sqliteCreateAggregate()
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?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)');
|
$db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing sqliteCreateFunction()
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?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)');
|
$db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing lastInsertId()
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?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('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, "PHP")');
|
||||||
$db->query('INSERT INTO foo VALUES (NULL, "PHP6")');
|
$db->query('INSERT INTO foo VALUES (NULL, "PHP6")');
|
||||||
|
@ -3,7 +3,7 @@ PDO_sqlite: Testing transaction
|
|||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$db = new pdo('sqlite:memory');
|
$db = new pdo('sqlite::memory:');
|
||||||
|
|
||||||
$db->beginTransaction();
|
$db->beginTransaction();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user