diff --git a/test/AssertTest.php b/test/AssertTest.php index bc5b1c7..2eb41df 100644 --- a/test/AssertTest.php +++ b/test/AssertTest.php @@ -1,5 +1,7 @@ authenticate('test', 'test'); } diff --git a/test/CreateTest.php b/test/CreateTest.php index 02d8fd9..f49310b 100644 --- a/test/CreateTest.php +++ b/test/CreateTest.php @@ -9,7 +9,7 @@ class CreateTest extends TestCase protected static $port, $tm; public static function doSetUpBeforeClass() { - self::$port = getenv('PRIMARY_PORT'); + self::$port = TestHelpers::getTarantoolPort(); self::$tm = ini_get("tarantool.timeout"); // error_log("before setting tarantool timeout"); ini_set("tarantool.timeout", "0.1"); diff --git a/test/DMLTest.php b/test/DMLTest.php index fb365bc..1ecff82 100644 --- a/test/DMLTest.php +++ b/test/DMLTest.php @@ -1,5 +1,7 @@ select('_vindex', [], 'name'); + $port = testHelpers::getTarantoolPort(); + (new Tarantool('localhost', $port))->select('_vindex', [], 'name'); $this->assertFalse(True); } catch (Exception $e) { $this->assertTrue(True); diff --git a/test/MsgPackTest.php b/test/MsgPackTest.php index 6ff805a..ddc2c08 100644 --- a/test/MsgPackTest.php +++ b/test/MsgPackTest.php @@ -1,5 +1,7 @@ ping(); } diff --git a/test/RandomTest.php b/test/RandomTest.php index b4e1c76..9eb60d1 100644 --- a/test/RandomTest.php +++ b/test/RandomTest.php @@ -1,5 +1,7 @@ ping(); } diff --git a/test/TestHelpers.php b/test/TestHelpers.php new file mode 100644 index 0000000..7e1f381 --- /dev/null +++ b/test/TestHelpers.php @@ -0,0 +1,24 @@ +