Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5797df

Browse filesBrowse files
committed
do not override the final runTest() method
1 parent 4511394 commit e5797df
Copy full SHA for e5797df

File tree

1 file changed

+12
-6
lines changed
Filter options

1 file changed

+12
-6
lines changed

‎src/Symfony/Component/Form/Test/FormPerformanceTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Test/FormPerformanceTestCase.php
+12-6Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,25 @@ abstract class FormPerformanceTestCase extends FormIntegrationTestCase
2525
{
2626
use VersionAwareTest;
2727

28+
private float $startTime;
2829
protected int $maxRunningTime = 0;
2930

30-
protected function runTest(): mixed
31+
protected function setUp(): void
3132
{
32-
$s = microtime(true);
33-
$result = parent::runTest();
34-
$time = microtime(true) - $s;
33+
parent::setUp();
34+
35+
$this->startTime = microtime(true);
36+
}
37+
38+
protected function assertPostConditions(): void
39+
{
40+
parent::assertPostConditions();
41+
42+
$time = microtime(true) - $this->startTime;
3543

3644
if (0 != $this->maxRunningTime && $time > $this->maxRunningTime) {
3745
$this->fail(\sprintf('expected running time: <= %s but was: %s', $this->maxRunningTime, $time));
3846
}
39-
40-
return $result;
4147
}
4248

4349
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.