PHPUnit_Extensions_Database_DataSet_ReplacementTable::getRow PHP Method

getRow() public method

Returns the an associative array keyed by columns for the given row.
public getRow ( integer $row ) : array
$row integer
return array
    public function getRow($row)
    {
        $row = $this->table->getRow($row);
        return array_map(array($this, 'getReplacedValue'), $row);
    }

Usage Example

Ejemplo n.º 1
0
 public function testGetRow()
 {
     $actual = new PHPUnit_Extensions_Database_DataSet_ReplacementTable($this->startingTable, array('[NULL]' => NULL), array('%%%name%%%' => 'Mike Lively'));
     $this->assertEquals(array('table1_id' => 1, 'column1' => 'My name is Mike Lively', 'column2' => 200, 'column3' => 34.64, 'column4' => 'yghkf;a  hahfg8ja h;'), $actual->getRow(0));
     $this->assertEquals(array('table1_id' => 3, 'column1' => 'ha;gyt', 'column2' => 462, 'column3' => '[NULL] not really', 'column4' => NULL), $actual->getRow(2));
 }