Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
Revert "Add method to whitelist a specific domain for Facebook messen…
Browse files Browse the repository at this point in the history
…ger feat…"
  • Loading branch information
ousmanedev committed Nov 17, 2016
1 parent 308fb5c commit 828458b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
6 changes: 0 additions & 6 deletions lib/Botamp/Client.php
Expand Up @@ -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 = [
Expand Down
20 changes: 0 additions & 20 deletions tests/Botamp/ClientTest.php
Expand Up @@ -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.
Expand Down

0 comments on commit 828458b

Please sign in to comment.