File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,22 @@ public function testShouldParseXmlConfigurationExecutionOrderCombined(): void
155
155
@\unlink ($ tmpFilename );
156
156
}
157
157
158
+ public function testShouldParseXmlConfigurationToEnforceTimeLimitAndDefaultTimeout (): void
159
+ {
160
+ $ tmpFilename = \sys_get_temp_dir () . \DIRECTORY_SEPARATOR . 'phpunit. ' . \uniqid () . '.xml ' ;
161
+ $ xml = "<phpunit enforceTimeLimit='true' defaultTimeLimit='432'></phpunit> " . \PHP_EOL ;
162
+ \file_put_contents ($ tmpFilename , $ xml );
163
+
164
+ $ configurationInstance = Configuration::getInstance ($ tmpFilename );
165
+ $ this ->assertFalse ($ configurationInstance ->hasValidationErrors (), 'option causes validation error ' );
166
+
167
+ $ configurationValues = $ configurationInstance ->getPHPUnitConfiguration ();
168
+ $ this ->assertSame (true , $ configurationValues ['enforceTimeLimit ' ]);
169
+ $ this ->assertSame (432 , $ configurationValues ['defaultTimeLimit ' ]);
170
+
171
+ @\unlink ($ tmpFilename );
172
+ }
173
+
158
174
public function testFilterConfigurationIsReadCorrectly (): void
159
175
{
160
176
$ this ->assertEquals (
You can’t perform that action at this time.
0 commit comments