Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
SchemaValidationTest Class Reference
Inheritance diagram for SchemaValidationTest:
MftfTestCase

Public Member Functions

 testInvalidTestSchema ()
 
- Public Member Functions inherited from MftfTestCase
 generateAndCompareTest ($testName)
 
 validateSchemaErrorWithTest ($fileContents, $objectType, $expectedError)
 

Protected Member Functions

 tearDown ()
 

Additional Inherited Members

- Data Fields inherited from MftfTestCase
const RESOURCES_PATH
 

Detailed Description

Definition at line 12 of file SchemaValidationTest.php.

Member Function Documentation

◆ tearDown()

tearDown ( )
protected

After method functionality

Returns
void

Definition at line 38 of file SchemaValidationTest.php.

39  {
40  AspectMock::clean();
41  }

◆ testInvalidTestSchema()

testInvalidTestSchema ( )

Test generation of a test referencing an action group with no arguments

Exceptions

Definition at line 20 of file SchemaValidationTest.php.

21  {
22  AspectMock::double(MftfApplicationConfig::class, ['debugEnabled' => true]);
23  $testFile = ['testFile.xml' => "<tests><test name='testName'><annotations>a</annotations></test></tests>"];
24  $expectedError = TESTS_MODULE_PATH .
25  DIRECTORY_SEPARATOR .
26  "TestModule" .
27  DIRECTORY_SEPARATOR .
28  "Test" .
29  DIRECTORY_SEPARATOR .
30  "testFile.xml";
31  $this->validateSchemaErrorWithTest($testFile, 'Test', $expectedError);
32  }
validateSchemaErrorWithTest($fileContents, $objectType, $expectedError)

The documentation for this class was generated from the following file: