11 use PHPUnit\Framework\TestCase;
33 $test->createAllTestFiles();
35 $cestFile = $test->getExportDir() .
37 $testObject->getCodeceptionName() .
40 $this->assertTrue(file_exists($cestFile));
42 $this->assertFileEquals(
43 self::RESOURCES_PATH . DIRECTORY_SEPARATOR . $testObject->getName() .
".txt",
58 $this->clearHandler();
59 $fullTestModulePath = TESTS_MODULE_PATH .
66 foreach ($fileContents as
$fileName => $fileContent) {
67 $tempFile = $fullTestModulePath .
$fileName;
68 $handle =
fopen($tempFile,
'w') or die(
'Cannot open file: ' . $tempFile);
73 $this->expectExceptionMessage($expectedError);
76 foreach (array_keys($fileContents) as
$fileName) {
79 $this->clearHandler();
88 private function clearHandler()
91 $property = new \ReflectionProperty(TestObjectHandler::class,
'testObjectHandler');
92 $property->setAccessible(
true);
93 $property->setValue(
null);
96 $property = new \ReflectionProperty(ObjectManager::class,
'instance');
97 $property->setAccessible(
true);
98 $property->setValue(
null);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
static getInstance($dir=null, $tests=[], $debug=false)
validateSchemaErrorWithTest($fileContents, $objectType, $expectedError)
generateAndCompareTest($testName)