PDepend\Source\AST\ASTCompilationUnit::__toString PHP Method

__toString() public method

Returns the string representation of this class.
public __toString ( ) : string
return string
    public function __toString()
    {
        return $this->fileName === null ? '' : $this->fileName;
    }

Usage Example

 /**
  * testMagicStringMethodReturnInjectedFileNameValue
  *
  * @return void
  */
 public function testMagicStringMethodReturnInjectedFileNameValue()
 {
     $file = new ASTCompilationUnit(__FILE__);
     $this->assertEquals(__FILE__, $file->__toString());
 }