CiviDBAssert
in package
Tags
Table of Contents
Methods
- assertAttributesEquals() : mixed
- assertDBCompareValue() : mixed
- Compare a single column value in a retrieved DB record to an expected value.
- assertDBCompareValues() : mixed
- Compare all values in a single retrieved DB record to an array of expected values.
- assertDBNotNull() : null|string
- Request a record from the DB by seachColumn+searchValue. Success if a record is found.
- assertDBNull() : mixed
- Request a record from the DB by seachColumn+searchValue. Success if returnColumn value is NULL.
- assertDBRowNotExist() : mixed
- Request a record from the DB by id. Success if row not found.
- assertDBState() : mixed
- Generic function to compare expected values after an api call to retrieved DB values.
Methods
assertAttributesEquals()
public
assertAttributesEquals(mixed &$testCase, mixed &$expectedValues, mixed &$actualValues) : mixed
Parameters
- $testCase : mixed
- $expectedValues : mixed
- $actualValues : mixed
assertDBCompareValue()
Compare a single column value in a retrieved DB record to an expected value.
public
assertDBCompareValue(mixed &$testCase, string $daoName, mixed $searchValue, mixed $returnColumn, mixed $searchColumn, mixed $expectedValue, string $message) : mixed
Parameters
- $testCase : mixed
- $daoName : string
- $searchValue : mixed
- $returnColumn : mixed
- $searchColumn : mixed
- $expectedValue : mixed
- $message : string
assertDBCompareValues()
Compare all values in a single retrieved DB record to an array of expected values.
public
assertDBCompareValues(mixed &$testCase, mixed $daoName, mixed $searchParams, mixed $expectedValues) : mixed
Parameters
- $testCase : mixed
- $daoName : mixed
- $searchParams : mixed
- $expectedValues : mixed
assertDBNotNull()
Request a record from the DB by seachColumn+searchValue. Success if a record is found.
public
assertDBNotNull(mixed &$testCase, mixed $daoName, mixed $searchValue, mixed $returnColumn, mixed $searchColumn, mixed $message) : null|string
Parameters
- $testCase : mixed
- $daoName : mixed
- $searchValue : mixed
- $returnColumn : mixed
- $searchColumn : mixed
- $message : mixed
Return values
null|stringassertDBNull()
Request a record from the DB by seachColumn+searchValue. Success if returnColumn value is NULL.
public
assertDBNull(mixed &$testCase, mixed $daoName, mixed $searchValue, mixed $returnColumn, mixed $searchColumn, mixed $message) : mixed
Parameters
- $testCase : mixed
- $daoName : mixed
- $searchValue : mixed
- $returnColumn : mixed
- $searchColumn : mixed
- $message : mixed
assertDBRowNotExist()
Request a record from the DB by id. Success if row not found.
public
assertDBRowNotExist(mixed &$testCase, mixed $daoName, mixed $id, mixed $message) : mixed
Parameters
- $testCase : mixed
- $daoName : mixed
- $id : mixed
- $message : mixed
assertDBState()
Generic function to compare expected values after an api call to retrieved DB values.
public
assertDBState(mixed &$testCase, mixed $daoName, mixed $id, mixed $match[, bool $delete = FALSE ]) : mixed
Parameters
- $testCase : mixed
- $daoName : mixed
- $id : mixed
- $match : mixed
- $delete : bool = FALSE