public function testField(): void
{ $this->testingFakeConnection->
schema()->
addField('faking_table', 'added_field',
['type' => 'int', 'not null' => FALSE
]);
$this->
assertTrue($this->testingFakeConnection->
schema()->
fieldExists('faking_table', 'added_field'
));
$this->testingFakeConnection->
schema()->
changeField('faking_table', 'added_field', 'changed_field',
['type' => 'int', 'not null' => FALSE
]);
$this->
assertFalse($this->testingFakeConnection->
schema()->
fieldExists('faking_table', 'added_field'
));
$this->
assertTrue($this->testingFakeConnection->
schema()->
fieldExists('faking_table', 'changed_field'
));
$this->testingFakeConnection->
schema()->
dropField('faking_table', 'changed_field'
);
$this->
assertFalse($this->testingFakeConnection->
schema()->
fieldExists('faking_table', 'changed_field'
));
} /**
* @covers \Drupal\Core\Database\Connection::insert
* @covers \Drupal\Core\Database\Connection::select
*/
public function testInsert(): void
{ $num_records_before =
$this->testingFakeConnection->
query('SELECT COUNT(*) FROM {faking_table}'
)->
fetchField();
$this->testingFakeConnection->
insert('faking_table'
)