@@ -17,8 +17,8 @@ class TestCase
1717{
1818 /** @internal */
1919 public const
20- LIST_METHODS = 'nette-tester-list-methods ' ,
21- METHOD_PATTERN = '#^test[A-Z0-9_]# ' ;
20+ ListMethods = 'nette-tester-list-methods ' ,
21+ MethodPattern = '#^test[A-Z0-9_]# ' ;
2222
2323 /** @var bool */
2424 private $ handleErrors = false ;
@@ -36,13 +36,13 @@ public function run(): void
3636 throw new \LogicException ('Calling TestCase::run($method) is deprecated. Use TestCase::runTest($method) instead. ' );
3737 }
3838
39- $ methods = array_values (preg_grep (self ::METHOD_PATTERN , array_map (function (\ReflectionMethod $ rm ): string {
39+ $ methods = array_values (preg_grep (self ::MethodPattern , array_map (function (\ReflectionMethod $ rm ): string {
4040 return $ rm ->getName ();
4141 }, (new \ReflectionObject ($ this ))->getMethods ())));
4242
4343 if (isset ($ _SERVER ['argv ' ]) && ($ tmp = preg_filter ('#--method=([\w-]+)$#Ai ' , '$1 ' , $ _SERVER ['argv ' ]))) {
4444 $ method = reset ($ tmp );
45- if ($ method === self ::LIST_METHODS ) {
45+ if ($ method === self ::ListMethods ) {
4646 $ this ->sendMethodList ($ methods );
4747 return ;
4848 }
@@ -72,7 +72,7 @@ public function runTest(string $method, ?array $args = null): void
7272 {
7373 if (!method_exists ($ this , $ method )) {
7474 throw new TestCaseException ("Method ' $ method' does not exist. " );
75- } elseif (!preg_match (self ::METHOD_PATTERN , $ method )) {
75+ } elseif (!preg_match (self ::MethodPattern , $ method )) {
7676 throw new TestCaseException ("Method ' $ method' is not a testing method. " );
7777 }
7878
0 commit comments