protected function RearrangeFieldsTest::assertFieldOrder in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views_ui/src/Tests/RearrangeFieldsTest.php \Drupal\views_ui\Tests\RearrangeFieldsTest::assertFieldOrder()
Check if the fields are in the correct order.
Parameters
$view_name: The name of the view.
$fields: Array of field names.
1 call to RearrangeFieldsTest::assertFieldOrder()
- RearrangeFieldsTest::testRearrangeFields in core/
modules/ views_ui/ src/ Tests/ RearrangeFieldsTest.php - Tests field sorting.
File
- core/
modules/ views_ui/ src/ Tests/ RearrangeFieldsTest.php, line 48 - Contains \Drupal\views_ui\Tests\RearrangeFieldsTest.
Class
- RearrangeFieldsTest
- Tests the reordering of fields via AJAX.
Namespace
Drupal\views_ui\TestsCode
protected function assertFieldOrder($view_name, $fields) {
$this
->drupalGet('admin/structure/views/nojs/rearrange/' . $view_name . '/default/field');
foreach ($fields as $idx => $field) {
$this
->assertFieldById('edit-fields-' . $field . '-weight', $idx + 1);
}
}