@@ 31-52 (lines=22) @@ | ||
28 | /** |
|
29 | * @return string |
|
30 | */ |
|
31 | public function getFilename(): string |
|
32 | { |
|
33 | $classChunks = explode('\\', $this->yaml['class']); |
|
34 | $className = array_pop($classChunks); |
|
35 | $className = 'Empty' . $className; |
|
36 | $namespace = ''; |
|
37 | if (count($classChunks) > 0) { |
|
38 | $namespace .= '\\' . implode('\\', $classChunks); |
|
39 | $namespace = str_replace('\\\\', '\\', $namespace); |
|
40 | } |
|
41 | return $this->yaml['src']['path'] . |
|
42 | DIRECTORY_SEPARATOR . |
|
43 | static::NAMESPACE . |
|
44 | DIRECTORY_SEPARATOR . |
|
45 | str_replace( |
|
46 | '\\', |
|
47 | DIRECTORY_SEPARATOR, |
|
48 | $namespace . '\\' . $className |
|
49 | ) . |
|
50 | '.php' |
|
51 | ; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @return Node |
@@ 30-51 (lines=22) @@ | ||
27 | /** |
|
28 | * @return string |
|
29 | */ |
|
30 | public function getFilename(): string |
|
31 | { |
|
32 | $classChunks = explode('\\', $this->yaml['class']); |
|
33 | $className = array_pop($classChunks); |
|
34 | $className = 'Empty' . $className; |
|
35 | $namespace = ''; |
|
36 | if (count($classChunks) > 0) { |
|
37 | $namespace .= '\\' . implode('\\', $classChunks); |
|
38 | $namespace = str_replace('\\\\', '\\', $namespace); |
|
39 | } |
|
40 | return $this->yaml['tests']['path'] . |
|
41 | DIRECTORY_SEPARATOR . |
|
42 | static::NAMESPACE . |
|
43 | DIRECTORY_SEPARATOR . |
|
44 | str_replace( |
|
45 | '\\', |
|
46 | DIRECTORY_SEPARATOR, |
|
47 | $namespace . '\\' . $className |
|
48 | ) . |
|
49 | 'Test.php' |
|
50 | ; |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @return Node |