PHP Class Scalr\Tests\TestCase

Since: 03.12.2012
Author: Vitaliy Demidov ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: scalr/scalr Class Usage Examples

Méthodes publiques

Свойство Type Description
$dbLog

Méthodes publiques

Méthode Description
assertArrayHas ( mixed $value, string $key, array | ArrayAccess $arr, string $message = '' ) Constraints that array has key and value
assertSubClassOf ( string $className, object $object, string $message = '' ) Constraints that object is sub-class of the specified class
camelize ( string $input ) : string Camelizes string
disableDbLog ( ) Disables mysql log
enableDbLog ( ) Enables mysql log
getAccessibleMethod ( object $object, string $method ) : ReflectionMethod Gets reflection method for the specified object
getAccessibleProperty ( object $object, string $property ) : ReflectionProperty Gets reflection property for the specified object
getDbLog ( ) : array Gets mysql database log
getFixturesDirectory ( ) : string Returns fixtures directory
getTestName ( string $suffix = '' ) : string Gets test name
isSkippedFunctionalTest ( string $type = null ) : boolean Returns true if functional tests should be skipped.

Méthodes protégées

Méthode Description
getInstallationId ( ) : string Retrieves ID of the Scalr installation.
getSessionId ( ) : string Retrieves unique session id.
runTest ( )
setUp ( )
tearDown ( )

Method Details

assertArrayHas() public static méthode

Constraints that array has key and value
public static assertArrayHas ( mixed $value, string $key, array | ArrayAccess $arr, string $message = '' )
$value mixed Expected array value
$key string Expected array key
$arr array | ArrayAccess An array which needs to be evaluated
$message string Message

assertSubClassOf() public static méthode

Constraints that object is sub-class of the specified class
public static assertSubClassOf ( string $className, object $object, string $message = '' )
$className string The name of the class
$object object The object to check
$message string optional The message

camelize() public méthode

Camelizes string
public camelize ( string $input ) : string
$input string
Résultat string Returns camelized string

disableDbLog() public static méthode

Disables mysql log
public static disableDbLog ( )

enableDbLog() public static méthode

Enables mysql log
public static enableDbLog ( )

getAccessibleMethod() public static méthode

Gets reflection method for the specified object
public static getAccessibleMethod ( object $object, string $method ) : ReflectionMethod
$object object Object
$method string Private or Protected Method name
Résultat ReflectionMethod Returns reflection method for provided object with setAccessible property

getAccessibleProperty() public static méthode

Gets reflection property for the specified object
public static getAccessibleProperty ( object $object, string $property ) : ReflectionProperty
$object object Object
$property string Private or protected property name
Résultat ReflectionProperty Returns reflection property for provided object with setAccessible property

getDbLog() public static méthode

Gets mysql database log
public static getDbLog ( ) : array
Résultat array Returns logged sql queries

getFixturesDirectory() public méthode

Returns fixtures directory
public getFixturesDirectory ( ) : string
Résultat string Returns fixtures directory without trailing slash

getInstallationId() protected static méthode

It is used for isolation the functional tests of third party services like AWS, OpenStack ... etc
protected static getInstallationId ( ) : string
Résultat string Returns ID of the Scalr installation

getSessionId() protected static méthode

This number is unique per each test execution.
protected static getSessionId ( ) : string
Résultat string Returns unique session id.

getTestName() public static méthode

Gets test name
public static getTestName ( string $suffix = '' ) : string
$suffix string optional Name suffix
Résultat string Returns test name

isSkippedFunctionalTest() public static méthode

Returns true if functional tests should be skipped.
public static isSkippedFunctionalTest ( string $type = null ) : boolean
$type string optional The type of the test ui, api, cloud-dependent. If option is not provided it will try to resolve static::TEST_TYPE constant
Résultat boolean Returns true if functional tests should be skipped.

runTest() protected méthode

See also: PHPUnit_Framework_TestCase::runTest()
protected runTest ( )

setUp() protected méthode

See also: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )

tearDown() protected méthode

See also: PHPUnit_Framework_TestCase::tearDown()
protected tearDown ( )

Property Details

$dbLog public_oe static_oe property

public static $dbLog