mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 17:12:41 +00:00
31 lines
702 B
PHP
31 lines
702 B
PHP
|
<?php
|
||
|
declare(strict_types=1);
|
||
|
namespace JKingWeb\NewsSync;
|
||
|
|
||
|
|
||
|
class TestDbStatementSQLite3 extends \PHPUnit\Framework\TestCase {
|
||
|
use Test\Tools;
|
||
|
|
||
|
protected $c;
|
||
|
protected $s;
|
||
|
|
||
|
function setUp() {
|
||
|
date_default_timezone_set("UTC");
|
||
|
$c = new \SQLite3(":memory:");
|
||
|
$c->enableExceptions(true);
|
||
|
$s = $c->prepare("SELECT ? as value");
|
||
|
$this->c = $c;
|
||
|
$this->s = $s;
|
||
|
}
|
||
|
|
||
|
function tearDown() {
|
||
|
try {$this->s->close();} catch(\Exception $e) {}
|
||
|
$this->c->close();
|
||
|
unset($this->s);
|
||
|
unset($this->c);
|
||
|
}
|
||
|
|
||
|
function testConstructStatement() {
|
||
|
$this->assertInstanceOf(Db\StatementSQLite3::class, new Db\StatementSQLite3($this->c, $this->s));
|
||
|
}
|
||
|
}
|