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 2323 */
2424class LiveCodeTest extends \PHPUnit \Framework \TestCase
2525{
26- /**
27- * @var \Magento\Framework\Shell
28- */
29- protected $ _shell ;
30-
31- /**
32- * @var string
33- */
34- protected $ _command ;
35-
3626 /**
3727 * @var string
3828 */
@@ -43,25 +33,6 @@ class LiveCodeTest extends \PHPUnit\Framework\TestCase
4333 */
4434 protected static $ pathToSource = '' ;
4535
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-
6536 /**
6637 * Setup basics for all tests
6738 *
You can’t perform that action at this time.
0 commit comments