Browse Source

Updated doc block and test

Eugene Ritter 5 years ago
parent
commit
588fb2ab58
2 changed files with 4 additions and 3 deletions
  1. 3 2
      src/Http/Client.php
  2. 1 1
      tests/TestCase/Http/ClientTest.php

+ 3 - 2
src/Http/Client.php

@@ -232,9 +232,10 @@ class Client implements ClientInterface
      * Url must parse into a scheme and host.
      *
      * @param  string  $url A string url e.g. https://example.com
-     * @return self
+     * @return static
+     * @throws InvalidArgumentException
      */
-    public static function createScopedClientFromUrl(string $url): self
+    public static function createScopedClientFromUrl(string $url)
     {
         $parts = parse_url($url);
 

+ 1 - 1
tests/TestCase/Http/ClientTest.php

@@ -923,7 +923,7 @@ class ClientTest extends TestCase
     public function testCreateScopedClientSetsPort()
     {
         $client = Client::createScopedClientFromUrl('https://example.co:8765/');
-        $this->assertEquals('8765', $client->getConfig('port'));
+        $this->assertSame(8765, $client->getConfig('port'));
     }
 
     /**