Skip to content
Permalink
Browse files

feat: Support Monolog v2 (#1705)

  • Loading branch information...
jdpedrie authored and dwsupplee committed Sep 5, 2019
1 parent 4b7c6ab commit 76436eb1dcb8a0c3ffe51080640fb8707af0361e
Showing with 8 additions and 9 deletions.
  1. +1 −1 composer.json
  2. +7 −8 tests/Google/Service/ResourceTest.php
@@ -10,7 +10,7 @@
"google/auth": "^1.0",
"google/apiclient-services": "~0.13",
"firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
"monolog/monolog": "^1.17",
"monolog/monolog": "^1.17|^2.0",
"phpseclib/phpseclib": "~0.3.10||~2.0",
"guzzlehttp/guzzle": "~5.3.1||~6.0",
"guzzlehttp/psr7": "^1.2"
@@ -60,9 +60,8 @@ public function setUp()
$this->client = $this->getMockBuilder("Google_Client")
->disableOriginalConstructor()
->getMock();
$this->logger = $this->getMockBuilder("Monolog\Logger")
->disableOriginalConstructor()
->getMock();
$logger = $this->prophesize("Monolog\Logger");
$this->logger = $logger->reveal();
$this->client->expects($this->any())
->method("getLogger")
->will($this->returnValue($this->logger));
@@ -140,11 +139,11 @@ public function testCallServiceDefinedRoot()
$this->assertEquals("https://sample.example.com/method/path", (string) $request->getUri());
$this->assertEquals("POST", $request->getMethod());
}
/**
* Some Google Service (Google_Service_Directory_Resource_Channels and
* Google_Service_Reports_Resource_Channels) use a different servicePath value
* that should override the default servicePath value, it's represented by a /
* Some Google Service (Google_Service_Directory_Resource_Channels and
* Google_Service_Reports_Resource_Channels) use a different servicePath value
* that should override the default servicePath value, it's represented by a /
* before the resource path. All other Services have no / before the path
*/
public function testCreateRequestUriForASelfDefinedServicePath()
@@ -167,7 +166,7 @@ public function testCreateRequestUriForASelfDefinedServicePath()
$request = $resource->call('testMethod', array(array()));
$this->assertEquals('https://test.example.com/admin/directory_v1/watch/stop', (string) $request->getUri());
}
public function testCreateRequestUri()
{
$restPath = "plus/{u}";

0 comments on commit 76436eb

Please sign in to comment.
You can’t perform that action at this time.