You are here

public function ServerStorageTest::serverDelete in Search API 8

Tests whether deleting a server works correctly.

Parameters

\Drupal\search_api\ServerInterface $server: The server used for this test.

1 call to ServerStorageTest::serverDelete()
ServerStorageTest::testServerCrud in tests/src/Kernel/Server/ServerStorageTest.php
Tests all CRUD operations as a queue of operations.

File

tests/src/Kernel/Server/ServerStorageTest.php, line 125

Class

ServerStorageTest
Tests whether the storage of search servers works correctly.

Namespace

Drupal\Tests\search_api\Kernel\Server

Code

public function serverDelete(ServerInterface $server) {
  $this->storage
    ->delete([
    $server,
  ]);
  $loaded_server = $this->storage
    ->load($server
    ->id());
  $this
    ->assertNull($loaded_server);
}