Browse Source

Fix blob tests

rpm
J. King 3 years ago
parent
commit
b5f959aabf
  1. 4
      tests/cases/Db/BaseResult.php
  2. 12
      tests/cases/Db/PostgreSQL/TestResult.php
  3. 12
      tests/cases/Db/PostgreSQLPDO/TestResult.php

4
tests/cases/Db/BaseResult.php

@ -133,13 +133,13 @@ abstract class BaseResult extends \JKingWeb\Arsse\Test\AbstractTest {
public function testGetBlobRow(): void {
$exp = ['blob' => hex2bin("DEADBEEF")];
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$test = new $this->resultClass(...$this->makeResult(static::$selectBlob));
$this->assertEquals($exp, $test->getRow());
}
public function testGetBlobValue(): void {
$exp = hex2bin("DEADBEEF");
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$test = new $this->resultClass(...$this->makeResult(static::$selectBlob));
$this->assertEquals($exp, $test->getValue());
}
}

12
tests/cases/Db/PostgreSQL/TestResult.php

@ -30,16 +30,4 @@ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult {
}
parent::tearDownAfterClass();
}
public function testGetBlobRow(): void {
$exp = ['blob' => hex2bin("DEADBEEF")];
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$this->assertEquals($exp, $test->getRow());
}
public function testGetBlobValue(): void {
$exp = hex2bin("DEADBEEF");
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$this->assertEquals($exp, $test->getValue());
}
}

12
tests/cases/Db/PostgreSQLPDO/TestResult.php

@ -21,16 +21,4 @@ class TestResult extends \JKingWeb\Arsse\TestCase\Db\BaseResult {
$set = static::$interface->query($q);
return [static::$interface, $set];
}
public function testGetBlobRow(): void {
$exp = ['blob' => hex2bin("DEADBEEF")];
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$this->assertEquals($exp, $test->getRow());
}
public function testGetBlobValue(): void {
$exp = hex2bin("DEADBEEF");
$test = new $this->resultClass(...$this->makeResult(self::$selectBlob));
$this->assertSame($exp, $test->getValue());
}
}

Loading…
Cancel
Save