Exemple #1
0
 /**
  * @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;
 }
Exemple #2
0
 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;
 }