Add 'php/phpxmlrpc/' from commit 'cd5dbb4a511e7a616a61187a5de1a611a9748cbd'
[plcapi.git] / php / phpxmlrpc / tests / phpunit_coverage.php
diff --git a/php/phpxmlrpc/tests/phpunit_coverage.php b/php/phpxmlrpc/tests/phpunit_coverage.php
new file mode 100644 (file)
index 0000000..ae7b998
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Used to serve back the server-side code coverage results to phpunit-selenium
+ *
+ * @copyright (C) 2007-2015 G. Giunta
+ * @license code licensed under the BSD License: see file license.txt
+ **/
+
+$coverageFile = realpath(__DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/phpunit_coverage.php");
+
+// has to be the same value as used in server.php
+$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage';
+
+chdir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY']);
+
+include_once $coverageFile;
\ No newline at end of file