Admin
dashboard
file manager
command
php exec
/
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
vendor
/
rector
/
rector-phpunit
/
src
/
Naming
path:
go
upload
mkdir
name
type
size
perms
modified
actions
[parent directory]
TestClassNameResolver.php
file
894 B
0644
2024-11-08 13:59:10
edit
delete
rename
editing: TestClassNameResolver.php
<?php declare (strict_types=1); namespace Rector\PHPUnit\Naming; final class TestClassNameResolver { /** * @return string[] */ public function resolve(string $className) : array { $classNameParts = \explode('\\', $className); $possibleTestClassNames = [$className . 'Test']; $partCount = \count($classNameParts); for ($i = 0; $i < $partCount; ++$i) { $possibleClassNameParts = $classNameParts; \array_splice($possibleClassNameParts, $i, 0, ['Tests']); $possibleTestClassNames[] = \implode('\\', $possibleClassNameParts) . 'Test'; $possibleClassNameParts = $classNameParts; \array_splice($possibleClassNameParts, $i, 0, ['Test']); $possibleTestClassNames[] = \implode('\\', $possibleClassNameParts) . 'Test'; } return $possibleTestClassNames; } }
save
cancel