public function AckNodeAccessTest::testFieldAccess in Access Control Kit 7
Test controlling access by a field value.
File
- ack_node/
ack_node.test, line 286 - Tests for the ACK node module.
Class
- AckNodeAccessTest
- Tests the node access functions.
Code
public function testFieldAccess() {
$this
->setUpTaxonomy('test_field_access', 'ACKEntityTaxonomyTermReference');
$edit = array(
'handlers[node][ACKEntityTaxonomyTermReference][field_name]' => 'field_tags',
);
$this
->drupalPost('admin/structure/access/test-field-access', $edit, 'Save access scheme');
$this
->assertText('Updated access scheme', 'Handler settings saved.');
$this
->assertTaxonomyAccess('test_field_access');
}