public function ServerStorageTest::serverLoad in Search API 8
Tests whether loading a server works correctly.
Parameters
\Drupal\search_api\ServerInterface $server: The server used for this test.
2 calls to ServerStorageTest::serverLoad()
- ServerStorageTest::serverUpdate in tests/
src/ Kernel/ Server/ ServerStorageTest.php - Tests whether updating a server works correctly.
- 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 93
Class
- ServerStorageTest
- Tests whether the storage of search servers works correctly.
Namespace
Drupal\Tests\search_api\Kernel\ServerCode
public function serverLoad(ServerInterface $server) {
$loaded_server = $this->storage
->load($server
->id());
$this
->assertSame($server
->label(), $loaded_server
->label());
$this->storage
->resetCache();
$loaded_server = $this->storage
->load($server
->id());
$this
->assertSame($server
->label(), $loaded_server
->label());
}