You are here

public function HttpClientTest::testGetCommandWhichDoesNotExists in HTTP Client Manager 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/HttpClientTest.php \Drupal\Tests\http_client_manager\Unit\HttpClientTest::testGetCommandWhichDoesNotExists()

Tests HttpClient::getCommand() with wrong argument.

@covers ::getCommand

@expectedException \InvalidArgumentException @expectedExceptionMessage No operation found named Missing

File

tests/src/Unit/HttpClientTest.php, line 80

Class

HttpClientTest
Class HttpClientTest.

Namespace

Drupal\Tests\http_client_manager\Unit

Code

public function testGetCommandWhichDoesNotExists() {
  $command = $this->client
    ->getCommand('Missing');
  $this
    ->assertEmpty($command);
}