Skip to content

Commit 76436eb

Browse files
jdpedriedwsupplee
authored andcommitted
feat: Support Monolog v2 (#1705)
1 parent 4b7c6ab commit 76436eb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"google/auth": "^1.0",
1111
"google/apiclient-services": "~0.13",
1212
"firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0",
13-
"monolog/monolog": "^1.17",
13+
"monolog/monolog": "^1.17|^2.0",
1414
"phpseclib/phpseclib": "~0.3.10||~2.0",
1515
"guzzlehttp/guzzle": "~5.3.1||~6.0",
1616
"guzzlehttp/psr7": "^1.2"

tests/Google/Service/ResourceTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ public function setUp()
6060
$this->client = $this->getMockBuilder("Google_Client")
6161
->disableOriginalConstructor()
6262
->getMock();
63-
$this->logger = $this->getMockBuilder("Monolog\Logger")
64-
->disableOriginalConstructor()
65-
->getMock();
63+
$logger = $this->prophesize("Monolog\Logger");
64+
$this->logger = $logger->reveal();
6665
$this->client->expects($this->any())
6766
->method("getLogger")
6867
->will($this->returnValue($this->logger));
@@ -140,11 +139,11 @@ public function testCallServiceDefinedRoot()
140139
$this->assertEquals("https://sample.example.com/method/path", (string) $request->getUri());
141140
$this->assertEquals("POST", $request->getMethod());
142141
}
143-
142+
144143
/**
145-
* Some Google Service (Google_Service_Directory_Resource_Channels and
146-
* Google_Service_Reports_Resource_Channels) use a different servicePath value
147-
* that should override the default servicePath value, it's represented by a /
144+
* Some Google Service (Google_Service_Directory_Resource_Channels and
145+
* Google_Service_Reports_Resource_Channels) use a different servicePath value
146+
* that should override the default servicePath value, it's represented by a /
148147
* before the resource path. All other Services have no / before the path
149148
*/
150149
public function testCreateRequestUriForASelfDefinedServicePath()
@@ -167,7 +166,7 @@ public function testCreateRequestUriForASelfDefinedServicePath()
167166
$request = $resource->call('testMethod', array(array()));
168167
$this->assertEquals('https://test.example.com/admin/directory_v1/watch/stop', (string) $request->getUri());
169168
}
170-
169+
171170
public function testCreateRequestUri()
172171
{
173172
$restPath = "plus/{u}";

0 commit comments

Comments
 (0)