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