public function ClientTest::testAddSlash in Little helpers 7.2
Test that send() adds slashes automatically as needed.
File
- tests/
Rest/ ClientTest.php, line 25
Class
- ClientTest
- Test the JSON/REST API-client.
Namespace
Drupal\little_helpers\RestCode
public function testAddSlash() {
$client = $this
->mockClient();
$client
->expects($this
->once())
->method('sendRequest')
->with('https://example.com/no-slash', $this
->anything())
->willReturn((object) [
'data' => '{}',
]);
$client
->get('no-slash');
}