PHP Class Phalcon\Test\UnitTestCase

Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: phalcon/incubator Class Usage Examples

Protected Properties

Property Type Description
$config Phalcon\Config | null Holds the configuration variables and other stuff I can use the DI container but for tests like the Translate we do not need the overhead
$di Phalcon\DiInterface

Public Methods

Method Description
checkExtension ( mixed $extension ) Checks if a particular extension is loaded and if not it marks the tests skipped
getConfig ( ) : null | Phalcon\Config Returns the Config object if any.
getDI ( ) : Phalcon\DiInterface Returns the internal Dependency Injector.
setConfig ( Phalcon\Config $config ) Sets the Config object.
setDI ( Phalcon\DiInterface $di ) Sets the Dependency Injector.

Protected Methods

Method Description
cleanFile ( string $path, string $fileName ) Removes a file from the system
getFileName ( string $prefix = '', string $suffix = 'log' ) : string Returns a unique file name
setUp ( ) This method is called before a test is executed.
tearDown ( )

Method Details

checkExtension() public method

Checks if a particular extension is loaded and if not it marks the tests skipped
public checkExtension ( mixed $extension )
$extension mixed

cleanFile() protected method

Removes a file from the system
protected cleanFile ( string $path, string $fileName )
$path string
$fileName string

getConfig() public method

Returns the Config object if any.
public getConfig ( ) : null | Phalcon\Config
return null | Phalcon\Config

getDI() public method

Returns the internal Dependency Injector.
See also: Injectable::getDI
public getDI ( ) : Phalcon\DiInterface
return Phalcon\DiInterface

getFileName() protected method

Returns a unique file name
protected getFileName ( string $prefix = '', string $suffix = 'log' ) : string
$prefix string A prefix for the file
$suffix string A suffix for the file
return string

setConfig() public method

Sets the Config object.
public setConfig ( Phalcon\Config $config )
$config Phalcon\Config

setDI() public method

Sets the Dependency Injector.
See also: Injectable::setDI
public setDI ( Phalcon\DiInterface $di )
$di Phalcon\DiInterface

setUp() protected method

This method is called before a test is executed.
protected setUp ( )

tearDown() protected method

protected tearDown ( )

Property Details

$config protected_oe property

Holds the configuration variables and other stuff I can use the DI container but for tests like the Translate we do not need the overhead
protected Config,Phalcon|null $config
return Phalcon\Config | null

$di protected_oe property

protected DiInterface,Phalcon $di
return Phalcon\DiInterface