Remaining classes for base usage.

PHPUnit_Extensions_Database_TestCase no longer throws any errors when
running with assume_php=false.
parent 4f868e5a
<?hh // decl
class PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
implements PHPUnit_Extensions_Database_DB_IDatabaseConnection {
protected PHPUnit_Extensions_Database_DB_IMetaData $metadata;
public function __construct(protected PDO $connection, string $schema);
public function close(): void;
public function getMetaData(): PHPUnit_Extensions_Database_DB_IMetaData;
public function getSchema(): ?string;
public function createDataSet(
?array $tableNames = null,
): PHPUnit_Extensions_Database_DataSet_IDataSet;
public function createQueryTable(
string $resultName,
string $sql,
): PHPUnit_Extensions_Database_DB_Table;
public function getConfig(): void;
public function getConnection(): PDO;
public function getRowCount(
string $tableName,
?string $whereClause = null,
): int;
public function quoteSchemaObject(string $object): string;
public function getTruncateCommand(): string;
public function allowsCascading(): bool;
public function disablePrimaryKeys(string $tableName): void;
public function enablePrimaryKeys(string $tableName): void;
}
......@@ -9,8 +9,7 @@ interface PHPUnit_Extensions_Database_DB_IDatabaseConnection {
string $resultName,
string $sql,
): PHPUnit_Extensions_Database_DataSet_ITable;
public function getConnection(
): PHPUnit_Extensions_Database_DB_IDatabaseConnection;
public function getConnection(): PDO;
public function getMetaData(): PHPUnit_Extensions_Database_DB_IMetaData;
public function getRowCount(
string $tableName,
......
<?hh // decl
class PHPUnit_Extensions_Database_DB_Table
extends PHPUnit_Extensions_Database_DataSet_AbstractTable {
public function __construct(
PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData,
PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection,
);
}
<?hh // decl
class PHPUnit_Extensions_Database_DataSet_AbstractTable
implements PHPUnit_Extensions_Database_DataSet_ITable {
protected PHPUnit_Extensions_Database_DataSet_ITableMetaData
$tableMetaData;
protected array $data;
protected function setTableMetaData(
PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData,
): void;
public function getTableMetaData(
): PHPUnit_Extensions_Database_DataSet_ITableMetaData;
public function getRowCount(): int;
public function getValue(int $row, int $column);
public function getRow(int $row): array;
public function matches(
PHPUnit_Extensions_Database_DataSet_ITable $other,
): bool;
public function assertContainsRow(array $row): bool;
public function __toString(): string;
protected function rowToString(array $row): string;
}
<?hh // decl
class PHPUnit_Extensions_Database_DataSet_MysqlXmlDataSet
extends PHPUnit_Extensions_Database_DataSet_AbstractXmlDataSet {
protected function getTableInfo(
array $tableColumns,
array $tableValues,
): void;
public static function write(
PHPUnit_Extensions_Database_DataSet_IDataSet $dataset,
string $filename,
): void;
}
<?hh // decl
class PHPUnit_Extensions_Database_DataSet_XmlDataSet
extends PHPUnit_Extensions_Database_DataSet_AbstractXmlDataSet {
protected function getTableInfo(
array $tableColumns,
array $tableValues,
): void;
public static function write(
PHPUnit_Extensions_Database_DataSet_IDataSet $dataset,
string $filename,
): void;
}
<?hh // decl
class PHPUnit_Extensions_Database_Operation_Factory {
public static function NONE(
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function CLEAN_INSERT(
bool $cascadeTruncates = false,
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function INSERT(
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function TRUNCATE(
bool $cascadeTruncates = false,
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function DELETE(
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function DELETE_ALL(
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
public static function UPDATE(
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
}
......@@ -12,9 +12,9 @@ trait PHPUnit_Extensions_Database_TestCase_Trait {
protected abstract function getDataSet(
): PHPUnit_Extensions_Database_DataSet_IDataSet;
protected function getSetUpOperation(
): PHPUnit_Extensions_Database_Operation_DatabaseOperation;
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
protected function getTearDownOperation(
): PHPUnit_Extensions_Database_Operation_DatabaseOperation;
): PHPUnit_Extensions_Database_Operation_IDatabaseOperation;
protected function newDatabaseTester(): PHPUnit_Extensions_Database_ITester;
protected function createDefaultDBConnection(
PDO $connection,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment