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.