tasks/ext/phpunit/PHPUnitUtil.php
\PHPUnitUtil
Package: phing\tasks\ext\phpunit
Parameters
Returns
Various utility functions
- Author
- Michiel Rook
- Since
- 2.1.0
- Version
- $Id: c569f96e625ed8f9c6ae5add2b2f4a0a6c3e5a54 $
Properties
Methods


getClassFromFileName(
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.
Name | Type | Description |
---|---|---|
$filename | string | the filename |
Type | Description |
---|---|
string | the name fo the class |


getDefinedClasses(
string $filename, \Path $classpath
=
NULL
)
:
array
static
Parameters
Returns
Name | Type | Description |
---|---|---|
$filename | string | the filename |
$classpath | \Path | optional classpath |
Type | Description |
---|---|
array | list of classes defined in the file |


getPackageName(
string $classname
)
:
string
static
Returns the package of a class as defined in the docblock of the class using @package
Parameters
Returns
Name | Type | Description |
---|---|---|
$classname | string | the name of the class |
Type | Description |
---|---|
string | the name of the package |


getSubpackageName(
string $classname
)
:
string | null
static
Returns the subpackage of a class as defined in the docblock of the class using @subpackage
Parameters
Returns
Details
Name | Type | Description |
---|---|---|
$classname | string | the name of the class |
Type | Description |
---|---|
string | null | the name of the subpackage |
- Author
- Benjamin Schultz