PHP Class Scalr\Tests\Functional\Api\V2\TestData\ApiFixture

Since: 5.11 (03.12.2015)
Author: Andrii Penchuk ([email protected])
Afficher le fichier Open project: scalr/scalr Class Usage Examples

Protected Properties

Свойство Type Description
$aclTypes array Acl types
$adapterName string Entity adapter name
$apiVersion string API version
$defaultOperation array Default fixtures operation
$env Scalr\Model\Entity\Account\Environment Environment instance
$sets array Data from fixtures
$testEnvId integer Environment identifier
$testUserId integer User identifier
$type string Api endpoint type
$user Scalr\Model\Entity\Account\User Test user
$userTypes array Users types

Méthodes publiques

Méthode Description
__construct ( array $sets, string $type ) TestDataFixtures constructor.
loadData ( string $fixtures, string $type ) : array Generate data for ApiTest
prepareTestData ( ) Generate test objects for ApiTest

Méthodes protégées

Méthode Description
prepareAccountCostCenter ( string $name ) Add CostCenter to account
prepareAccountTeam ( string $name ) Creates and save Account Team entities with data from fixtures
prepareCostCenter ( string $name ) Creates and save CostCenter entity with data from fixtures
prepareData ( string $name ) Check Data if Data has reference another project resolve this data property
prepareFarm ( string $name ) Creates and save Farm entity with data from fixtures
prepareFarmRole ( string $name ) Creates and save farm role entity with data from fixtures
preparePathInfo ( ) : array Prepare options for each patch options
prepareProjects ( string $name ) Add Project entities for test
prepareRole ( string $name ) Create role entity with data from fixtures
prepareRoleCategory ( string $name ) Create role category entity with data from fixtures
prepareRoleImage ( string $name ) Creates and save RoleImage entity with data from fixtures
prepareScript ( string $name ) Creates and save Script entities with data from fixtures
resolveProperty ( $value, $index ) : array If property has reference to the object, will return property or object

Method Details

__construct() public méthode

TestDataFixtures constructor.
public __construct ( array $sets, string $type )
$sets array data from yaml fixtures
$type string api specifications type

loadData() public static méthode

Generate data for ApiTest
public static loadData ( string $fixtures, string $type ) : array
$fixtures string patch to fixtures directory
$type string api specifications type
Résultat array

prepareAccountCostCenter() protected méthode

Add CostCenter to account
protected prepareAccountCostCenter ( string $name )
$name string CostCenter data name

prepareAccountTeam() protected méthode

Creates and save Account Team entities with data from fixtures
protected prepareAccountTeam ( string $name )
$name string Account Team data name

prepareCostCenter() protected méthode

Creates and save CostCenter entity with data from fixtures
protected prepareCostCenter ( string $name )
$name string CostCenter data name

prepareData() protected méthode

Check Data if Data has reference another project resolve this data property
protected prepareData ( string $name )
$name string data name

prepareFarm() protected méthode

Creates and save Farm entity with data from fixtures
protected prepareFarm ( string $name )
$name string Role category data name

prepareFarmRole() protected méthode

Creates and save farm role entity with data from fixtures
protected prepareFarmRole ( string $name )
$name string Role category data name

preparePathInfo() protected méthode

Prepare options for each patch options
protected preparePathInfo ( ) : array
Résultat array

prepareProjects() protected méthode

Add Project entities for test
protected prepareProjects ( string $name )
$name string Project data name

prepareRole() protected méthode

Create role entity with data from fixtures
protected prepareRole ( string $name )
$name string Role category data name

prepareRoleCategory() protected méthode

Create role category entity with data from fixtures
protected prepareRoleCategory ( string $name )
$name string Role category data name

prepareRoleImage() protected méthode

Creates and save RoleImage entity with data from fixtures
protected prepareRoleImage ( string $name )
$name string Role category data name

prepareScript() protected méthode

Creates and save Script entities with data from fixtures
protected prepareScript ( string $name )
$name string Script data name

prepareTestData() abstract public méthode

Generate test objects for ApiTest
abstract public prepareTestData ( )

resolveProperty() protected méthode

If property has reference to the object, will return property or object
protected resolveProperty ( $value, $index ) : array
$value string property name
$index int property value
Résultat array

Property Details

$aclTypes protected_oe static_oe property

Acl types
protected static array $aclTypes
Résultat array

$adapterName protected_oe property

Entity adapter name
protected string $adapterName
Résultat string

$apiVersion protected_oe static_oe property

API version
protected static string $apiVersion
Résultat string

$defaultOperation protected_oe static_oe property

Default fixtures operation
protected static array $defaultOperation
Résultat array

$env protected_oe static_oe property

Environment instance
protected static Environment,Scalr\Model\Entity\Account $env
Résultat Scalr\Model\Entity\Account\Environment

$sets protected_oe property

Data from fixtures
protected array $sets
Résultat array

$testEnvId protected_oe static_oe property

Environment identifier
protected static int $testEnvId
Résultat integer

$testUserId protected_oe static_oe property

User identifier
protected static int $testUserId
Résultat integer

$type protected_oe property

Api endpoint type
protected string $type
Résultat string

$user protected_oe static_oe property

Test user
protected static User,Scalr\Model\Entity\Account $user
Résultat Scalr\Model\Entity\Account\User

$userTypes protected_oe static_oe property

Users types
protected static array $userTypes
Résultat array