Skip to content

Commit bc9db50

Browse files
Add test for timeout config
1 parent c724107 commit bc9db50

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,23 @@ public function testCompressionDefaultConfig()
293293

294294
$this->assertFalse($configuration['clients']['default']['connections'][0]['compression']);
295295
}
296+
297+
public function testTimeoutConfig()
298+
{
299+
$configuration = $this->getConfigs(array(
300+
'clients' => array(
301+
'simple_timeout' => array(
302+
'url' => 'http://localhost:9200',
303+
'timeout' => 123,
304+
),
305+
'connect_timeout' => array(
306+
'url' => 'http://localhost:9200',
307+
'connectTimeout' => 234,
308+
),
309+
),
310+
));
311+
312+
$this->assertEquals(123, $configuration['clients']['simple_timeout']['connections'][0]['timeout']);
313+
$this->assertEquals(234, $configuration['clients']['connect_timeout']['connections'][0]['connectTimeout']);
314+
}
296315
}

0 commit comments

Comments
 (0)