protected function OpignoSimpleUIOGTest::_createOGContentNode in Opigno 7.0
Create an OG contentg node
File
- modules/
opigno_simple_ui/ tests/ opigno_simple_ui.og.test, line 133 - Check OG overrides.
Class
- OpignoSimpleUIOGTest
- @file Check OG overrides.
Code
protected function _createOGContentNode($gid = NULL) {
$this
->drupalGet('node/add/og-content', isset($gid) ? array(
'query' => array(
'gids_node[]' => $gid,
),
) : array());
// Check that the audience field is hidden
$this
->assertTrue(preg_match('/div (class="[\\sa-z0-9\\-\\_]*element-hidden[\\sa-z0-9\\-\\_]*"(\\s)?)?id="edit-group-audience"((\\s)?class="[\\sa-z0-9\\-\\_]*element-hidden[\\sa-z0-9\\-\\_]*")?/', $this
->drupalGetContent()), 'Group audience select is hidden');
$edit = array(
'title' => $this
->randomName(8),
);
$this
->drupalPost($this
->getURL(), $edit, 'Save');
}