Ejemplo n.º 1
0
 private function parseClassName()
 {
     $tokens = $this->getFileTokens();
     $namespace = NamespaceTokenParser::parse($tokens);
     $className = ClassNameTokenParser::parse($tokens);
     $this->validateParsedData($namespace, $className);
     $this->className = sprintf("%s\\%s", $namespace, $className);
 }
 /** @test */
 public function classNameNotFound()
 {
     $namespace = NamespaceTokenParser::parse($this->getTokensForFile(self::BAD_NAMESPACE));
     $this->assertEquals('', $namespace);
 }