| @@ 96-106 (lines=11) @@ | ||
| 93 | ); |
|
| 94 | } |
|
| 95 | ||
| 96 | public function testStreamHttpClientHandlerCanBeForced() |
|
| 97 | { |
|
| 98 | $config = array_merge($this->config, [ |
|
| 99 | 'http_client_handler' => 'stream' |
|
| 100 | ]); |
|
| 101 | $fb = new Facebook($config); |
|
| 102 | $this->assertInstanceOf( |
|
| 103 | 'Facebook\HttpClients\FacebookStreamHttpClient', |
|
| 104 | $fb->getClient()->getHttpClientHandler() |
|
| 105 | ); |
|
| 106 | } |
|
| 107 | ||
| 108 | public function testGuzzleHttpClientHandlerCanBeForced() |
|
| 109 | { |
|
| @@ 108-118 (lines=11) @@ | ||
| 105 | ); |
|
| 106 | } |
|
| 107 | ||
| 108 | public function testGuzzleHttpClientHandlerCanBeForced() |
|
| 109 | { |
|
| 110 | $config = array_merge($this->config, [ |
|
| 111 | 'http_client_handler' => 'guzzle' |
|
| 112 | ]); |
|
| 113 | $fb = new Facebook($config); |
|
| 114 | $this->assertInstanceOf( |
|
| 115 | 'Facebook\HttpClients\FacebookGuzzleHttpClient', |
|
| 116 | $fb->getClient()->getHttpClientHandler() |
|
| 117 | ); |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * @expectedException \InvalidArgumentException |
|
| @@ 131-141 (lines=11) @@ | ||
| 128 | new Facebook($config); |
|
| 129 | } |
|
| 130 | ||
| 131 | public function testPersistentDataHandlerCanBeForced() |
|
| 132 | { |
|
| 133 | $config = array_merge($this->config, [ |
|
| 134 | 'persistent_data_handler' => 'memory' |
|
| 135 | ]); |
|
| 136 | $fb = new Facebook($config); |
|
| 137 | $this->assertInstanceOf( |
|
| 138 | 'Facebook\PersistentData\FacebookMemoryPersistentDataHandler', |
|
| 139 | $fb->getRedirectLoginHelper()->getPersistentDataHandler() |
|
| 140 | ); |
|
| 141 | } |
|
| 142 | ||
| 143 | public function testSettingAnInvalidUrlHandlerThrows() |
|
| 144 | { |
|