/** * @param mixed $data * * @return static */ public function setData($data) { $fullClassName = $this->composer->getClassNamespace($data['name']); $data = array_merge(['namespace' => Utils::getJustNamespace($fullClassName), 'className' => Utils::getJustClassName($fullClassName)], $data); $this->data = $data; return $this; }
public function setData($data) { $fullClassName = $this->composer->getClassNamespace($data['name']); $testName = str_replace("\\", "", Str::substr($fullClassName, strlen($this->composer->getRootNamespace()) + 1)) . 'Test'; $data = array_merge(['namespace' => Utils::getJustNamespace($fullClassName), 'className' => Utils::getJustClassName($fullClassName), 'testName' => $testName], $data); $this->data = $data; return $this; }