public function AccessingDataTest::testGetValue in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/aklump/loft_data_grids/tests/AccessingDataTest.php \AKlump\LoftDataGrids\AccessingDataTest::testGetValue()
File
- vendor/
aklump/ loft_data_grids/ tests/ phpunit/ AccessingDataTest.php, line 55 - Tests for the ExportData class data access.
Class
Namespace
AKlump\LoftDataGridsCode
public function testGetValue() {
$obj = new ExportData();
$obj
->add('Name', 'Aaron')
->add('Age', 39)
->next();
$obj
->add('Name', 'Hillary')
->add('Age', 37)
->next();
$obj
->add('Name', 'Maia')
->add('Age', 7)
->next();
$obj
->setPage(1);
$obj
->add('Color', 'Black')
->add('Make', 'Subaru')
->next();
$obj
->add('Color', 'White')
->add('Make', 'Hyundai')
->next();
$return = $obj
->setPage(0)
->setPointer(0)
->getValue('Age');
$this
->assertSame(39, $return);
$return = $obj
->setPage(0)
->getValue('Name');
$this
->assertSame('Aaron', $return);
$return = $obj
->setPage(1)
->setPointer(0)
->getValue('Color');
$this
->assertSame('Black', $return);
$return = $obj
->getValue('Make');
$this
->assertSame('Subaru', $return);
}