Skip to content

Commit 616e486

Browse files
authored
Update test to display the memory usage
1 parent 7498291 commit 616e486

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/CommandTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,30 @@ public function test_request()
5454
'method' => 'GET',
5555
'url' => 'http://127.0.0.1/welcome',
5656
'statusCode' => '200',
57+
'memory' => 23.43,
5758
'duration' => 10,
5859
]);
5960

6061
$command->requestInfo([
6162
'method' => 'POST',
6263
'url' => 'http://127.0.0.1:8080',
6364
'statusCode' => '404',
65+
'memory' => 26.43,
6466
'duration' => 1234,
6567
]);
6668

6769
$command->requestInfo([
6870
'method' => 'POST',
6971
'url' => 'http://127.0.0.1:8080/'.str_repeat('foo', 100),
7072
'statusCode' => 500,
73+
'memory' => 28.43,
7174
'duration' => 4567854,
7275
]);
7376

7477
$this->assertEquals(<<<'EOF'
75-
200 GET /welcome .................. 10.00 ms
76-
404 POST / ...................... 1234.00 ms
77-
500 POST /foofoofoofoofoofo... 4567854.00 ms
78+
200 GET /welcome ..........23.43 mb 10.00 ms
79+
404 POST / ..............26.43 mb 1234.00 ms
80+
500 POST /foofoofoofoofoofo... 23.46 mb 4567854.00 ms
7881

7982
EOF, $output->fetch());
8083
}

0 commit comments

Comments
 (0)