PHP Class PHPUnit_Extensions_Database_DataSet_ReplacementTable, qcodo

Author: Mike Lively ([email protected])
Inheritance: implements PHPUnit_Extensions_Database_DataSet_ITable
Mostra file Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$fullReplacements array
$subStrReplacements array
$table PHPUnit_Extensions_Database_DataSet_ITable

Public Methods

Method Description
__construct ( PHPUnit_Extensions_Database_DataSet_ITable $table, array $fullReplacements = [], array $subStrReplacements = [] ) Creates a new replacement table
__toString ( )
addFullReplacement ( string $value, string $replacement ) Adds a new full replacement
addSubStrReplacement ( string $value, string $replacement ) Adds a new substr replacement
assertEquals ( PHPUnit_Extensions_Database_DataSet_ITable $other ) Asserts that the given table matches this table.
getRow ( integer $row ) : array Returns the an associative array keyed by columns for the given row.
getRowCount ( ) : integer Returns the number of rows in this table.
getTableMetaData ( ) : PHPUnit_Extensions_Database_DataSet_ITableMetaData Returns the table's meta data.
getValue ( integer $row, integer $column ) Returns the value for the given column on the given row.

Protected Methods

Method Description
getReplacedValue ( $value )
rowToString ( array $row )

Method Details

__construct() public method

Creates a new replacement table
public __construct ( PHPUnit_Extensions_Database_DataSet_ITable $table, array $fullReplacements = [], array $subStrReplacements = [] )
$table PHPUnit_Extensions_Database_DataSet_ITable
$fullReplacements array
$subStrReplacements array

__toString() public method

public __toString ( )

addFullReplacement() public method

Full replacements will only replace values if the FULL value is a match
public addFullReplacement ( string $value, string $replacement )
$value string
$replacement string

addSubStrReplacement() public method

Substr replacements will replace all occurances of the substr in every column
public addSubStrReplacement ( string $value, string $replacement )
$value string
$replacement string

assertEquals() public method

Asserts that the given table matches this table.
public assertEquals ( PHPUnit_Extensions_Database_DataSet_ITable $other )
$other PHPUnit_Extensions_Database_DataSet_ITable

getReplacedValue() protected method

protected getReplacedValue ( $value )

getRow() public method

Returns the an associative array keyed by columns for the given row.
public getRow ( integer $row ) : array
$row integer
return array

getRowCount() public method

Returns the number of rows in this table.
public getRowCount ( ) : integer
return integer

getTableMetaData() public method

Returns the table's meta data.
public getTableMetaData ( ) : PHPUnit_Extensions_Database_DataSet_ITableMetaData
return PHPUnit_Extensions_Database_DataSet_ITableMetaData

getValue() public method

Returns the value for the given column on the given row.
public getValue ( integer $row, integer $column )
$row integer
$column integer

rowToString() protected method

protected rowToString ( array $row )
$row array

Property Details

$fullReplacements protected_oe property

protected array $fullReplacements
return array

$subStrReplacements protected_oe property

protected array $subStrReplacements
return array

$table protected_oe property

protected PHPUnit_Extensions_Database_DataSet_ITable $table
return PHPUnit_Extensions_Database_DataSet_ITable