public function FeedsOgTest::testImportOgReferenceWithoutAuthorizingOnCron in Feeds 7.2
Tests importing content for a group on cron runs.
File
- tests/
feeds_og.test, line 154 - Contains FeedsOgTest.
Class
- FeedsOgTest
- Tests for Organic Groups integration.
Code
public function testImportOgReferenceWithoutAuthorizingOnCron() {
$this
->setSettings('syndication', NULL, array(
'process_in_background' => TRUE,
));
list($group1, $group2) = $this
->setUpStuffForTestingOgReferenceWithoutAuthorizing();
// Schedule import and run cron.
$this
->drupalPost('node/3/import', NULL, 'Schedule import');
$this
->cronRun();
// Assert that both nodes were created.
$this
->assertNodeCount(5);
$node1 = node_load(4);
$this
->assertEqual('Lorem ipsum', $node1->title);
$this
->assertEqual($group1->nid, $node1->og_group_ref[LANGUAGE_NONE][0]['target_id']);
$node2 = node_load(5);
$this
->assertEqual('Ut wisi enim ad minim veniam', $node2->title);
$this
->assertEqual($group2->nid, $node2->og_group_ref[LANGUAGE_NONE][0]['target_id']);
}