phpunit configuration improvement

This feature implement env parameters for phpUnit configuration.
This upgrade is a first step for multi influxdb version testing
This commit is contained in:
Gianluca Arbezzano
2015-03-23 22:28:18 +01:00
parent c6d4ee4ce4
commit e125b296f9
2 changed files with 23 additions and 11 deletions
+12
View File
@@ -12,6 +12,18 @@
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<env name="UDP_PORT" value="5551"/>
<env name="UDP_DB" value="udp.test"/>
<env name="TCP_PORT" value="8086"/>
<env name="TCP_DB" value="tcp.test"/>
<env name="TCP_PROTOCOL" value="http"/>
<env name="HOST" value="localhost"/>
<env name="USERNAME" value="root"/>
<env name="PASSWORD" value="root"/>
</php>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
+11 -11
View File
@@ -1,18 +1,18 @@
<?php
return [
"tcp" => [
"host" => "localhost",
"port" => 8086,
"protocol" => "http",
"database" => "tcp.test",
"username" => "root",
"password" => "root",
"host" => getenv('HOST'),
"port" => getenv('TCP_PORT'),
"protocol" => getenv('TCP_PROTOCOL'),
"database" => getenv('TCP_DB'),
"username" => getenv('USERNAME'),
"password" => getenv('PASSWORD'),
],
"udp" => [
"host" => "localhost",
"port" => 5551,
"database" => "udp.test",
"username" => "root",
"password" => "root"
"host" => getenv('HOST'),
"port" => getenv('UDP_PORT'),
"database" => getenv('UDP_DB'),
"username" => getenv('USERNAME'),
"password" => getenv('PASSWORD'),
],
];