oa_coreSmoke.test in Open Atrium Core 7.2
Smoke testing of Open Atrium. Checks for a bunch of basic stuff
File
tests/oa_coreSmoke.testView source
<?php
/**
* @file
* Smoke testing of Open Atrium. Checks for a bunch of basic stuff
*/
class oa_coreSmoke extends oa_coreBaseWebTest {
static function getInfo() {
return array(
'name' => 'Smoke Test',
'description' => 'Test a variety of basic functions in oa_core',
'group' => 'OA',
);
}
function test_oa_smoke() {
extract($this
->createOaSpaceAndUsers());
$this
->drupalLogin($space_admin);
$terms = taxonomy_get_term_by_name('Discussion Section');
$discussion_section = $this
->createNodeInOaSpace($space, array(
'type' => 'oa_section',
'field_oa_section' => array(
LANGUAGE_NONE => array(
array(
'tid' => current($terms)->tid,
),
),
),
));
$terms = taxonomy_get_term_by_name('Calendar Section');
$calendar_section = $this
->createNodeInOaSpace($space, array(
'type' => 'oa_section',
'field_oa_section' => array(
LANGUAGE_NONE => array(
array(
'tid' => current($terms)->tid,
),
),
),
));
$terms = taxonomy_get_term_by_name('Document Section');
$document_section = $this
->createNodeInOaSpace($space, array(
'type' => 'oa_section',
'field_oa_section' => array(
LANGUAGE_NONE => array(
array(
'tid' => current($terms)->tid,
),
),
),
));
oa_messages_shutdown_send_messages();
$this
->drupalGet('node/' . $space->nid);
$this
->assertPattern('/\\<h2 class="pane-title">\\s*Recent Activity\\s*\\<\\/h2>/', t('Recent Activity widget visible on space'));
$this
->assertText($discussion_section->title, t('Discussion section visible on space'));
$this
->assertText($calendar_section->title, t('Calendar section visible on space'));
$this
->assertText($document_section->title, t('Document section visible on space'));
$this
->assertText($space_admin->name . ' ' . t('created') . ' ' . $discussion_section->title, t('Discussion section appears in recent activity'));
$this
->assertText($space_admin->name . ' ' . t('created') . ' ' . $calendar_section->title, t('Calendar section appears in recent activity'));
$this
->assertText($space_admin->name . ' ' . t('created') . ' ' . $document_section->title, t('Document section appears in recent activity'));
$this
->assertText('Create Discussion Post', t('Create Discussion visible on space'));
$this
->assertText('Create Document Page', t('Create Document Page visible on space'));
$this
->assertText('Create Event', t('Create Event visible on space'));
}
}
Classes
Name![]() |
Description |
---|---|
oa_coreSmoke | @file Smoke testing of Open Atrium. Checks for a bunch of basic stuff |