8
8
use AspectMock \Test as AspectMock ;
9
9
use Magento \FunctionalTestingFramework \StaticCheck \DeprecatedEntityUsageCheck ;
10
10
use Magento \FunctionalTestingFramework \StaticCheck \StaticChecksList ;
11
- use Magento \FunctionalTestingFramework \Util \Filesystem \DirSetupUtil ;
12
- use PHPUnit \Framework \TestCase ;
13
11
use Symfony \Component \Console \Input \InputInterface ;
12
+ use tests \util \MftfStaticTestCase ;
14
13
15
- class DeprecationStaticCheckTest extends TestCase
14
+ class DeprecationStaticCheckTest extends MftfStaticTestCase
16
15
{
17
- const STATIC_RESULTS_DIR = TESTS_MODULE_PATH .
18
- DIRECTORY_SEPARATOR .
19
- '_output ' .
20
- DIRECTORY_SEPARATOR .
21
- 'static-results ' ;
22
-
23
16
const LOG_FILE = self ::STATIC_RESULTS_DIR .
24
17
DIRECTORY_SEPARATOR .
25
18
DeprecatedEntityUsageCheck::ERROR_LOG_FILENAME .
@@ -30,20 +23,6 @@ class DeprecationStaticCheckTest extends TestCase
30
23
'DeprecationCheckModule ' .
31
24
DIRECTORY_SEPARATOR ;
32
25
33
- const RESOURCES_PATH = TESTS_MODULE_PATH .
34
- DIRECTORY_SEPARATOR .
35
- "Resources " .
36
- DIRECTORY_SEPARATOR .
37
- 'StaticChecks ' ;
38
-
39
- public static function setUpBeforeClass (): void
40
- {
41
- // remove static-results if it exists
42
- if (file_exists (self ::STATIC_RESULTS_DIR )) {
43
- DirSetupUtil::rmdirRecursive (self ::STATIC_RESULTS_DIR );
44
- }
45
- }
46
-
47
26
/**
48
27
* test static-check DeprecatedEntityUsageCheck.
49
28
*
@@ -68,25 +47,4 @@ public function testDeprecatedEntityUsageCheck()
68
47
self ::LOG_FILE
69
48
);
70
49
}
71
-
72
- /**
73
- * Sets input interface
74
- * @param $path
75
- * @return \PHPUnit\Framework\MockObject\MockObject
76
- */
77
- public function mockInputInterface ($ path )
78
- {
79
- $ input = $ this ->getMockBuilder (InputInterface::class)
80
- ->disableOriginalConstructor ()
81
- ->getMock ();
82
- $ input ->method ('getOption ' )
83
- ->with ('path ' )
84
- ->willReturn ($ path );
85
- return $ input ;
86
- }
87
-
88
- public function tearDown (): void
89
- {
90
- DirSetupUtil::rmdirRecursive (self ::STATIC_RESULTS_DIR );
91
- }
92
50
}
0 commit comments