/** * testClientWithDefaultConfig. */ public function testAddResource() { $mock = new MockHandler([new Response(200), new Response(200, [], 'test'), new Response(200, [], 'test')]); $handler = HandlerStack::create($mock); $client = new Client(['username' => 'admin', 'password' => 'admin', 'base_uri' => 'http://hogosha.dev/api', 'handler' => $handler]); $this->assertEquals('http://hogosha.dev/api', $client->getGuzzleClient()->getConfig()['base_uri']); $this->assertInstanceOf(NullLogger::class, $client->getLogger()); $this->assertEquals(sprintf('Irongate SDK %s', Version::VERSION), $client->getGuzzleClient()->getConfig()['headers']['User-Agent']); $this->assertEquals('application/json', $client->getGuzzleClient()->getConfig()['headers']['Content-Type']); }