php-src/ext/pdo_sqlite/tests/pdo_sqlite_statement_getattribute.phpt
2018-09-16 15:39:18 -03:00

20 lines
446 B
PHP

--TEST--
PDO_sqlite: Testing PDOStatement::getAttribute()
--SKIPIF--
<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
--FILE--
<?php
$db = new PDO('sqlite::memory:');
$st = $db->prepare('SELECT 1;');
var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT));
$st = $db->prepare('CREATE TABLE test (a TEXT);');
var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT));
?>
--EXPECT--
bool(true)
bool(false)