StubConnection.php in Drupal 8
File
core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
View source
<?php
namespace Drupal\Tests\Core\Database\Stub;
use Drupal\Core\Database\Connection;
use Drupal\Core\Database\StatementEmpty;
class StubConnection extends Connection {
public $driver = 'stub';
public function queryRange($query, $from, $count, array $args = [], array $options = []) {
return new StatementEmpty();
}
public function queryTemporary($query, array $args = [], array $options = []) {
return '';
}
public function driver() {
return $this->driver;
}
public function databaseType() {
return 'stub';
}
public function createDatabase($database) {
}
public function mapConditionOperator($operator) {
return NULL;
}
public function nextId($existing_id = 0) {
return 0;
}
}
Classes
Name |
Description |
StubConnection |
A stub of the abstract Connection class for testing purposes. |