Browse Source

Remove obsolete test code

microsub
J. King 5 years ago
parent
commit
a3dbb08da9
  1. 14
      tests/cases/Db/SQLite3/TestStatement.php
  2. 14
      tests/cases/Db/SQLite3PDO/TestStatement.php

14
tests/cases/Db/SQLite3/TestStatement.php

@ -30,20 +30,6 @@ class TestStatement extends \JKingWeb\Arsse\Test\AbstractTest {
unset($this->c);
}
protected function checkBinding($input, array $expectations, bool $strict = false) {
$nativeStatement = $this->c->prepare("SELECT ? as value");
$s = new self::$imp($this->c, $nativeStatement);
$types = array_unique(Statement::TYPES);
foreach ($types as $type) {
$s->retypeArray([$strict ? "strict $type" : $type]);
$val = $s->runArray([$input])->getRow()['value'];
$this->assertSame($expectations[$type], $val, "Binding from type $type failed comparison.");
$s->retype(...[$strict ? "strict $type" : $type]);
$val = $s->run(...[$input])->getRow()['value'];
$this->assertSame($expectations[$type], $val, "Binding from type $type failed comparison.");
}
}
/** @dataProvider provideBindings */
public function testBindATypedValue($value, $type, $exp) {
$typeStr = "'".str_replace("'", "''", $type)."'";

14
tests/cases/Db/SQLite3PDO/TestStatement.php

@ -31,20 +31,6 @@ class TestStatement extends \JKingWeb\Arsse\Test\AbstractTest {
$this->clearData();
}
protected function checkBinding($input, array $expectations, bool $strict = false) {
$nativeStatement = $this->c->prepare("SELECT ? as value");
$s = new self::$imp($this->c, $nativeStatement);
$types = array_unique(Statement::TYPES);
foreach ($types as $type) {
$s->retypeArray([$strict ? "strict $type" : $type]);
$val = $s->runArray([$input])->getRow()['value'];
$this->assertSame($expectations[$type], $val, "Binding from type $type failed comparison.");
$s->retype(...[$strict ? "strict $type" : $type]);
$val = $s->run(...[$input])->getRow()['value'];
$this->assertSame($expectations[$type], $val, "Binding from type $type failed comparison.");
}
}
/** @dataProvider provideBindings */
public function testBindATypedValue($value, $type, $exp) {
$typeStr = "'".str_replace("'", "''", $type)."'";

Loading…
Cancel
Save