mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Remove obsolete test code
This commit is contained in:
parent
30d6f6db37
commit
a3dbb08da9
2 changed files with 0 additions and 28 deletions
|
@ -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)."'";
|
||||
|
|
|
@ -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…
Reference in a new issue