PHP Класс Scalr\Tests\TestCase

С версии: 03.12.2012
Автор: Vitaliy Demidov ([email protected])
Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$dbLog

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
getInstallationId ( ) : string Retrieves ID of the Scalr installation.
getSessionId ( ) : string Retrieves unique session id.
runTest ( )
setUp ( )
tearDown ( )

Описание методов

assertArrayHas() публичный статический Метод

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() публичный статический Метод

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() публичный Метод

Camelizes string
public camelize ( string $input ) : string
$input string
Результат string Returns camelized string

disableDbLog() публичный статический Метод

Disables mysql log
public static disableDbLog ( )

enableDbLog() публичный статический Метод

Enables mysql log
public static enableDbLog ( )

getAccessibleMethod() публичный статический Метод

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
Результат ReflectionMethod Returns reflection method for provided object with setAccessible property

getAccessibleProperty() публичный статический Метод

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
Результат ReflectionProperty Returns reflection property for provided object with setAccessible property

getDbLog() публичный статический Метод

Gets mysql database log
public static getDbLog ( ) : array
Результат array Returns logged sql queries

getFixturesDirectory() публичный Метод

Returns fixtures directory
public getFixturesDirectory ( ) : string
Результат string Returns fixtures directory without trailing slash

getInstallationId() защищенный статический Метод

It is used for isolation the functional tests of third party services like AWS, OpenStack ... etc
protected static getInstallationId ( ) : string
Результат string Returns ID of the Scalr installation

getSessionId() защищенный статический Метод

This number is unique per each test execution.
protected static getSessionId ( ) : string
Результат string Returns unique session id.

getTestName() публичный статический Метод

Gets test name
public static getTestName ( string $suffix = '' ) : string
$suffix string optional Name suffix
Результат string Returns test name

isSkippedFunctionalTest() публичный статический Метод

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
Результат boolean Returns true if functional tests should be skipped.

runTest() защищенный Метод

См. также: PHPUnit_Framework_TestCase::runTest()
protected runTest ( )

setUp() защищенный Метод

См. также: PHPUnit_Framework_TestCase::setUp()
protected setUp ( )

tearDown() защищенный Метод

См. также: PHPUnit_Framework_TestCase::tearDown()
protected tearDown ( )

Описание свойств

$dbLog публичное статическое свойство

public static $dbLog