php-src/ext/pdo_firebird/tests/bug_74462.phpt
Kalle Sommer Nielsen 1c893b89bd PDO_Firebird test update, round 2
- This renames the environment variables to: PDO_FIREBIRD_TEST_XXX to be in line with other PDO test suites
- Adds an skipif.inc file that skips the tests if no database is set
- The test suite can now be run without PDO_FIREBIRD_TEST_HOSTNAME

$ set PDO_FIREBIRD_TEST_HOSTNAME=localhost
$ set PDO_FIREBIRD_TEST_DATABASE=C:\dev\php.fdb
$ nmake test TESTS=ext/pdo_firebird/tests
2019-05-02 23:19:27 +03:00

29 lines
668 B
PHP

--TEST--
PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
--SKIPIF--
<?php require('skipif.inc'); ?>
--FILE--
<?php
require 'testdb.inc';
@$dbh->exec('drop table atable');
$dbh->exec('create table atable (id integer not null, abool boolean)');
$dbh->exec('insert into atable (id, abool) values (1, true)');
$dbh->exec('insert into atable (id, abool) values (2, false)');
$dbh->exec('insert into atable (id, abool) values (3, null)');
$S = $dbh->query('select abool from atable order by id');
$D = $S->fetchAll(PDO::FETCH_COLUMN);
unset($S);
unset($dbh);
var_dump($D);
?>
--EXPECT--
array(3) {
[0]=>
bool(true)
[1]=>
bool(false)
[2]=>
NULL
}