tasks/ext/phpunit/PHPUnitUtil.php

Show: inherited
Table of Contents

\PHPUnitUtil

Package: phing\tasks\ext\phpunit

Various utility functions

Author
Michiel Rook  
Since
2.1.0  
Version
$Id: c569f96e625ed8f9c6ae5add2b2f4a0a6c3e5a54 $  

Properties

Propertyprotected  $definedClasses= 'array()'
static
Default valuearray()Details
Type
n/a

Methods

methodpublicgetClassFromFileName( string $filename ) : string
static

Derives the classname from a filename.

Assumes that there is only one class defined in that particular file, and that the naming follows the dot-path (Java) notation scheme.

Parameters
Name Type Description
$filename string

the filename

Returns
Type Description
string the name fo the class
methodpublicgetDefinedClasses( string $filename, \Path $classpath = NULL ) : array
static

Parameters
Name Type Description
$filename string

the filename

$classpath \Path

optional classpath

Returns
Type Description
array list of classes defined in the file
methodpublicgetPackageName( string $classname ) : string
static

Returns the package of a class as defined in the docblock of the class using @package

Parameters
Name Type Description
$classname string

the name of the class

Returns
Type Description
string the name of the package
methodpublicgetSubpackageName( string $classname ) : string | null
static

Returns the subpackage of a class as defined in the docblock of the class using @subpackage

Parameters
Name Type Description
$classname string

the name of the class

Returns
Type Description
string | null the name of the subpackage
Details
Author
Benjamin Schultz  
Documentation was generated by DocBlox 0.18.1.