From 0cdda1b6a8010ff485987c726706b1a6d1799944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Vanvelthem?= Date: Sat, 21 Dec 2019 12:41:36 +0100 Subject: [PATCH] fix(tests): pjbserver-tools fixed --- test/SolubleTestFactories.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/SolubleTestFactories.php b/test/SolubleTestFactories.php index f44c386..dab3cbd 100644 --- a/test/SolubleTestFactories.php +++ b/test/SolubleTestFactories.php @@ -28,7 +28,10 @@ class SolubleTestFactories */ public static function startJavaBridgeServer() { - if ($_SERVER['AUTORUN_PJB_STANDALONE'] == 'true') { + // For multiple ways phpunit return true + if ($_SERVER['AUTORUN_PJB_STANDALONE'] === true || + $_SERVER['AUTORUN_PJB_STANDALONE'] === 'true') { + if (self::$standaloneServer === null) { $server_address = self::getJavaBridgeServerAddress(); //$url = parse_url($server_address, PHP_URL_HOST); @@ -37,9 +40,11 @@ public static function startJavaBridgeServer() $params = [ 'port' => $port, 'classpaths' => [ - //__DIR__ . '/resources/mysql-connector-java-5.1.36-bin.jar', - __DIR__.'/resources/*.jar' - ] + __DIR__.'/resources/*.jar', + ], + 'server_jar' => __DIR__.'/../vendor/belgattitude/pjbserver-tools/resources/pjb713_standalone/JavaBridge.jar', + 'log_file' => sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'soluble-japha-pjbserver.log', + 'pid_file' => sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'soluble-japha-pjbserver.pid', ]; $config = new StandaloneServer\Config($params);