Skip to content

Commit 9b2f9a3

Browse files
MFTF-33582: Fixing verification test
1 parent 71596ba commit 9b2f9a3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<tests><test name='testName'><annotations>a</annotations></test></tests>

dev/tests/verification/Tests/SchemaValidationTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ class SchemaValidationTest extends MftfTestCase
1919
*/
2020
public function testInvalidTestSchema()
2121
{
22+
$mockConfig = $this->createMock(MftfApplicationConfig::class);
2223
$property = new ReflectionProperty(MftfApplicationConfig::class, 'debugLevel');
2324
$property->setAccessible(true);
24-
$property->setValue(MftfApplicationConfig::LEVEL_DEVELOPER);
25+
$property->setValue($mockConfig, MftfApplicationConfig::LEVEL_DEVELOPER);
26+
27+
$property = new ReflectionProperty(MftfApplicationConfig::class, 'MFTF_APPLICATION_CONTEXT');
28+
$property->setAccessible(true);
29+
$property->setValue($mockConfig);
2530

2631
$testFile = ['testFile.xml' => "<tests><test name='testName'><annotations>a</annotations></test></tests>"];
2732
$expectedError = TESTS_MODULE_PATH .
@@ -42,5 +47,9 @@ protected function tearDown(): void
4247
$property = new ReflectionProperty(MftfApplicationConfig::class, 'debugLevel');
4348
$property->setAccessible(true);
4449
$property->setValue(null);
50+
51+
$property = new ReflectionProperty(MftfApplicationConfig::class, 'MFTF_APPLICATION_CONTEXT');
52+
$property->setAccessible(true);
53+
$property->setValue(null);
4554
}
4655
}

0 commit comments

Comments
 (0)