public static function ViewTestData::dataSet in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Tests/ViewTestData.php \Drupal\views\Tests\ViewTestData::dataSet()
Returns a very simple test dataset.
4 calls to ViewTestData::dataSet()
- CounterTest::setUp in core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ CounterTest.php - PreviewTest::dataSet in core/
modules/ views_ui/ tests/ src/ FunctionalJavascript/ PreviewTest.php - Returns a very simple test dataset.
- ViewsKernelTestBase::dataSet in core/
modules/ views/ tests/ src/ Kernel/ ViewsKernelTestBase.php - Returns a very simple test dataset.
- ViewTestBase::dataSet in core/
modules/ views/ tests/ src/ Functional/ ViewTestBase.php - Returns a very simple test dataset.
File
- core/
modules/ views/ src/ Tests/ ViewTestData.php, line 234
Class
- ViewTestData
- Provides tests view data and the base test schema with sample data records.
Namespace
Drupal\views\TestsCode
public static function dataSet() {
return [
[
'name' => 'John',
'age' => 25,
'job' => 'Singer',
'created' => gmmktime(0, 0, 0, 1, 1, 2000),
'status' => 1,
],
[
'name' => 'George',
'age' => 27,
'job' => 'Singer',
'created' => gmmktime(0, 0, 0, 1, 2, 2000),
'status' => 0,
],
[
'name' => 'Ringo',
'age' => 28,
'job' => 'Drummer',
'created' => gmmktime(6, 30, 30, 1, 1, 2000),
'status' => 1,
],
[
'name' => 'Paul',
'age' => 26,
'job' => 'Songwriter',
'created' => gmmktime(6, 0, 0, 1, 1, 2000),
'status' => 0,
],
[
'name' => 'Meredith',
'age' => 30,
'job' => 'Speaker',
'created' => gmmktime(6, 30, 10, 1, 1, 2000),
'status' => 1,
],
];
}