1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
This commit is contained in:
J. King 2017-12-22 11:51:58 -05:00
parent a5318d1b12
commit 39cad91b78
9 changed files with 8 additions and 9 deletions

View file

@ -13,7 +13,7 @@ abstract class AbstractDriver implements Driver {
protected $transDepth = 0;
protected $transStatus = [];
protected abstract function getError(): string;
abstract protected function getError(): string;
/** @codeCoverageIgnore */
public function schemaVersion(): int {

View file

@ -44,4 +44,4 @@ trait PDODriver {
}
return new PDOStatement($this->db, $s, $paramTypes);
}
}
}

View file

@ -28,9 +28,11 @@ trait PDOError {
default:
return [Exception::class, "engineErrorGeneral", $err[1]." - ".$err[2]];
}
// no break
default:
return [Exception::class, "engineErrorGeneral", $err[2]]; // @codeCoverageIgnore
}
// no break
default:
return [Exception::class, "engineErrorGeneral", $err[0].": ".$err[2]]; // @codeCoverageIgnore
}
@ -39,4 +41,4 @@ trait PDOError {
public function getError(): string {
return (string) $this->db->errorInfo()[2];
}
}
}

View file

@ -82,7 +82,7 @@ class Driver extends \JKingWeb\Arsse\Db\AbstractDriver {
} elseif (PDODriver::requirementsMet()) {
return new PDODriver;
} else {
throw new Exception("extMissing", self::driverName());
throw new Exception("extMissing", self::driverName());
}
}

View file

@ -35,7 +35,7 @@ class PDODriver extends Driver {
} elseif (Driver::requirementsMet()) {
return new Driver;
} else {
throw new Exception("extMissing", self::driverName());
throw new Exception("extMissing", self::driverName());
}
}

View file

@ -14,7 +14,6 @@ use JKingWeb\Arsse\Db\SQLite3\PDODriver;
* @covers \JKingWeb\Arsse\Db\PDOStatement<extended>
* @covers \JKingWeb\Arsse\Db\PDOError */
class TestStatement extends \JKingWeb\Arsse\Test\AbstractTest {
protected $c;
protected static $imp = \JKingWeb\Arsse\Db\PDOStatement::class;

View file

@ -9,7 +9,6 @@ namespace JKingWeb\Arsse\TestCase\Lang;
use JKingWeb\Arsse\Lang as TestClass;
use org\bovigo\vfs\vfsStream;
/** @covers \JKingWeb\Arsse\Lang */
class TestBasic extends \JKingWeb\Arsse\Test\AbstractTest {
use \JKingWeb\Arsse\Test\Lang\Setup;

View file

@ -6,7 +6,6 @@
declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\User;
use JKingWeb\Arsse\Arsse;
use JKingWeb\Arsse\Conf;
use JKingWeb\Arsse\User;

View file

@ -103,7 +103,7 @@ trait Setup {
break;
case "bool":
$test[$col] = (int) ValueInfo::normalize($value, ValueInfo::T_BOOL | ValueInfo::M_DROP | valueInfo::M_NULL);
break;
break;
}
}
if ($row===$test) {