public function HttpStreamWrapperTest::testStreamSetOption in Remote Stream Wrapper 8
Test that the timeout is set properly in configuration.
@covers ::stream_set_option
File
- tests/
src/ Unit/ HttpStreamWrapperTest.php, line 101
Class
- HttpStreamWrapperTest
- @group remote_stream_wrapper @coversDefaultClass \Drupal\remote_stream_wrapper\StreamWrapper\HttpStreamWrapper
Namespace
Drupal\Tests\remote_stream_wrapper\UnitCode
public function testStreamSetOption() {
$wrapper = new HttpStreamWrapper();
$result = $wrapper
->stream_set_option(STREAM_OPTION_READ_TIMEOUT, 30, 50);
$this
->assertTrue($result);
$config = $wrapper
->getHttpConfig();
$this
->assertEquals($config['timeout'], 30.00005);
}