From 828458b8089ace2f8d623f575d59409da87da054 Mon Sep 17 00:00:00 2001 From: Rahmane OUSMANE Date: Thu, 17 Nov 2016 20:24:38 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Add=20method=20to=20whitelist=20a=20s?= =?UTF-8?q?pecific=20domain=20for=20Facebook=20messenger=20feat=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Botamp/Client.php | 6 ------ tests/Botamp/ClientTest.php | 20 -------------------- 2 files changed, 26 deletions(-) diff --git a/lib/Botamp/Client.php b/lib/Botamp/Client.php index e20ca11..ba28073 100644 --- a/lib/Botamp/Client.php +++ b/lib/Botamp/Client.php @@ -85,12 +85,6 @@ public function getPageAttributes() return ApiResponse::getContent($this->getHttpClient()->get($url)); } - public function whitelistForMessenger($domain) - { - $url = $this->getApiBase().'/'.$this->getApiVersion().'/me?domain='.$domain; - return ApiResponse::getContent($this->getHttpClient()->get($url)); - } - private function setHttpClient(HttpClient $httpClient, MessageFactory $messageFactory) { $plugins = [ diff --git a/tests/Botamp/ClientTest.php b/tests/Botamp/ClientTest.php index bc9a003..8b76176 100644 --- a/tests/Botamp/ClientTest.php +++ b/tests/Botamp/ClientTest.php @@ -76,26 +76,6 @@ public function testShouldGetPageAttributes() $this->assertEquals($attributes, $client->getPageAttributes()); } - public function testShouldwhitelistForMessenger(){ - $domain = 'http://example.com'; - $url = 'https://app.botamp.com/api/v1/me?domain='.$domain; - $response = ['status' =>'200', 'body'=> 'Successfully updated whitelisted domains']; - - $httpClient = $this->getHttpMethodsMock(array('get')); - $httpClient - ->expects($this->any()) - ->method('get') - ->with($url, array()) - ->will($this->returnValue($this->getPSR7Response($response))); - - $client = $this->getMock('Botamp\Client', array('getHttpClient'), array('123456789')); - $client->expects($this->any()) - ->method('getHttpClient') - ->willReturn($httpClient); - - $this->assertEquals($response, $client->whitelistForMessenger($domain)); - } - /** * @expectedException Botamp\Exceptions\Base * @expectedExceptionMessage No valid api version provided.