File tree Expand file tree Collapse file tree 2 files changed +27
-29
lines changed
dev/tests/static/testsuite/Magento Expand file tree Collapse file tree 2 files changed +27
-29
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Magento \Framework \Validator ;
4
+
5
+ /**
6
+ * Factory class for creating instances of the Regex validator.
7
+ *
8
+ * Note: This class is included as a stub in static tests to ensure
9
+ * compatibility with static analysis tools. When running static tests,
10
+ * ensure the corresponding stub is properly placed in the test environment.
11
+ */
12
+ class RegexFactory
13
+ {
14
+ /**
15
+ * Create a new Regex validator instance.
16
+ *
17
+ * @param array $data Optional configuration data for the Regex validator.
18
+ * @return Regex
19
+ *
20
+ * @note During static tests, this method may be tested using the stubbed
21
+ * version of this class to avoid dependency injection-related issues.
22
+ */
23
+ public function create (array $ data = []): Regex
24
+ {
25
+ return new Regex ($ data );
26
+ }
27
+ }
Original file line number Diff line number Diff line change 23
23
*/
24
24
class LiveCodeTest extends \PHPUnit \Framework \TestCase
25
25
{
26
- /**
27
- * @var \Magento\Framework\Shell
28
- */
29
- protected $ _shell ;
30
-
31
- /**
32
- * @var string
33
- */
34
- protected $ _command ;
35
-
36
26
/**
37
27
* @var string
38
28
*/
@@ -43,25 +33,6 @@ class LiveCodeTest extends \PHPUnit\Framework\TestCase
43
33
*/
44
34
protected static $ pathToSource = '' ;
45
35
46
- /**
47
- * @var boolean
48
- */
49
- protected static $ executedCompilation = false ;
50
-
51
- /**
52
- * Setup compilation
53
- *
54
- * @return void
55
- */
56
- protected function setUp (): void
57
- {
58
- $ this ->_shell = new \Magento \Framework \Shell (new \Magento \Framework \Shell \CommandRenderer ());
59
- $ basePath = BP ;
60
- $ basePath = str_replace ('\\' , '/ ' , $ basePath );
61
-
62
- $ this ->_command = 'php ' . $ basePath . '/bin/magento setup:di:compile ' ;
63
- }
64
-
65
36
/**
66
37
* Setup basics for all tests
67
38
*
You can’t perform that action at this time.
0 commit comments