Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 public function getTestPath($name)
 {
     $name = $this->getClassNamespace($name);
     $name = Str::substr($name, strlen($this->getRootNamespace()) + 1);
     $switchToDirectorySlashes = Utils::switchToDirectorySlashes($name);
     return 'tests' . DIRECTORY_SEPARATOR . str_replace(DIRECTORY_SEPARATOR, "", $switchToDirectorySlashes) . 'Test.php';
 }
Ejemplo n.º 3
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;
 }