function FaqAskTestCase::faqAskPostUnansweredQuestions in FAQ_Ask 6.2
2 calls to FaqAskTestCase::faqAskPostUnansweredQuestions()
- FaqAskAccessTestClass::testFaqAskAccess in ./faq_ask.test
- FaqAskCRUDTestClass::testUnpublishedQuestion in ./faq_ask.test
- Testing that the published state of the new question
is honoring the content type default
File
- ./faq_ask.test, line 194
- Test FAQ functionality Base test class. All tests inherits this one.
Hugely based on code from the test file block.test by boombatower
Class
- FaqAskTestCase
- Base class that is extended by test cases.
Code
function faqAskPostUnansweredQuestions() {
$this
->drupalLogin($this->faq_asker);
$this->faq1 = array();
$this->faq1['title'] = $this
->randomName(8);
$this->faq1['taxonomy[tags][1]'] = $this->term1['name'];
$this->faq1['detailed_question'] = $this
->randomName(16);
$this->faq1['faq_notify'] = FALSE;
$this
->drupalPost('faq_ask', $this->faq1, t('Save'));
$this
->assertText(t('FAQ @title has been created.', array(
'@title' => $this->faq1['title'],
)));
$this->faq2 = array();
$this->faq2['title'] = $this
->randomName(8);
$this->faq2['taxonomy[tags][1]'] = $this
->randomName(8);
$this->faq2['detailed_question'] = $this
->randomName(16);
$this->faq2['faq_notify'] = TRUE;
$this
->drupalPost('faq_ask', $this->faq2, t('Save'));
$this
->assertText(t('FAQ @title has been created.', array(
'@title' => $this->faq2['title'],
)));
}