8000 do not override the final runTest() method · symfony/symfony@e5797df · GitHub
[go: up one dir, main page]

Skip to content

Commit e5797df

Browse files
committed
do not override the final runTest() method
1 parent 4511394 commit e5797df

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

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

+12-6
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