Skip to content

Commit ff8dfa4

Browse files
committed
test: use four spaces indentation instead of tabs
There was no consistency in using spaces and tabs across test files. Now all tests are indented using four spaces. Aside of this, fixed places, where double indentation was used. It was annoying to switch a text editor between different indentation modes.
1 parent 9419d89 commit ff8dfa4

File tree

5 files changed

+722
-722
lines changed

5 files changed

+722
-722
lines changed

test/AssertTest.php

+53-53
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,57 @@
44

55
class AssertTest extends TestCase
66
{
7-
use TestCaseCompat;
8-
9-
protected static $tarantool, $tm;
10-
11-
public static function doSetUpBeforeClass() {
12-
self::$tm = ini_get("tarantool.request_timeout");
13-
ini_set("tarantool.request_timeout", "0.1");
14-
self::$tarantool = new Tarantool('localhost', getenv('PRIMARY_PORT'));
15-
self::$tarantool->authenticate('test', 'test');
16-
}
17-
18-
public static function doTearDownAfterClass() {
19-
ini_set("tarantool.request_timeout", self::$tm);
20-
}
21-
22-
protected function doTearDown() {
23-
$tuples = self::$tarantool->select("test");
24-
foreach($tuples as $value)
25-
self::$tarantool->delete("test", Array($value[0]));
26-
}
27-
28-
public function test_00_timedout() {
29-
self::$tarantool->eval("
30-
function assert_f()
31-
os.execute('sleep 1')
32-
return 0
33-
end");
34-
try {
35-
$result = self::$tarantool->call("assert_f");
36-
$this->assertFalse(True);
37-
} catch (TarantoolException $e) {
38-
// print($e->getMessage());
39-
$this->assertStringContainsString(
40-
"Failed to read", $e->getMessage());
41-
}
42-
43-
/* We can reconnect and everything will be ok */
44-
self::$tarantool->close();
45-
self::$tarantool->select("test");
46-
}
47-
48-
/**
49-
* @doesNotPerformAssertions
50-
*/
51-
public function test_01_closed_connection() {
52-
for ($i = 0; $i < 20000; $i++) {
53-
try {
54-
self::$tarantool->call("nonexistentfunction");
55-
} catch (TarantoolClientError $e) {
56-
continue;
57-
}
58-
}
59-
}
7+
use TestCaseCompat;
8+
9+
protected static $tarantool, $tm;
10+
11+
public static function doSetUpBeforeClass() {
12+
self::$tm = ini_get("tarantool.request_timeout");
13+
ini_set("tarantool.request_timeout", "0.1");
14+
self::$tarantool = new Tarantool('localhost', getenv('PRIMARY_PORT'));
15+
self::$tarantool->authenticate('test', 'test');
16+
}
17+
18+
public static function doTearDownAfterClass() {
19+
ini_set("tarantool.request_timeout", self::$tm);
20+
}
21+
22+
protected function doTearDown() {
23+
$tuples = self::$tarantool->select("test");
24+
foreach($tuples as $value)
25+
self::$tarantool->delete("test", Array($value[0]));
26+
}
27+
28+
public function test_00_timedout() {
29+
self::$tarantool->eval("
30+
function assert_f()
31+
os.execute('sleep 1')
32+
return 0
33+
end");
34+
try {
35+
$result = self::$tarantool->call("assert_f");
36+
$this->assertFalse(True);
37+
} catch (TarantoolException $e) {
38+
// print($e->getMessage());
39+
$this->assertStringContainsString(
40+
"Failed to read", $e->getMessage());
41+
}
42+
43+
/* We can reconnect and everything will be ok */
44+
self::$tarantool->close();
45+
self::$tarantool->select("test");
46+
}
47+
48+
/**
49+
* @doesNotPerformAssertions
50+
*/
51+
public function test_01_closed_connection() {
52+
for ($i = 0; $i < 20000; $i++) {
53+
try {
54+
self::$tarantool->call("nonexistentfunction");
55+
} catch (TarantoolClientError $e) {
56+
continue;
57+
}
58+
}
59+
}
6060
}

0 commit comments

Comments
 (0)