| 1 |
<?php |
<?php |
| 2 |
// $Id: stumble.test,v 1.1.2.3 2008/12/24 14:13:46 davereid Exp $ |
// $Id: stumble.test,v 1.1.2.4 2008/12/24 14:17:17 davereid Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
class StumbleTestCase extends DrupalWebTestCase { |
class StumbleTestCase extends DrupalWebTestCase { |
| 10 |
function getInfo() { |
public static function getInfo() { |
| 11 |
return array( |
return array( |
| 12 |
'name' => t('Stumble'), |
'name' => t('Stumble'), |
| 13 |
'description' => t('Test stumble module functionality.'), |
'description' => t('Test stumble module functionality.'), |
| 27 |
*/ |
*/ |
| 28 |
function testStumbleLink() { |
function testStumbleLink() { |
| 29 |
$node = $this->drupalCreateNode(array('promote' => 1, 'type' => 'story')); |
$node = $this->drupalCreateNode(array('promote' => 1, 'type' => 'story')); |
| 30 |
$stumble_link = l(t('Stumble'), 'stumble', array('query' => "nid={$node->nid}&type={$node->type}", title = t('View a random page on this site.'), class = "stumble")); |
$stumble_link = l(t('Stumble'), 'stumble', array('query' => "nid={$node->nid}&type={$node->type}", 'title' => t('View a random page on this site.'), 'class' => "stumble")); |
| 31 |
$this->drupalGet('node'); |
$this->drupalGet('node'); |
| 32 |
$this->assertNoLink(t('Stumble'), t('No stumble link found on teasers.')); |
$this->assertNoLink(t('Stumble'), t('No stumble link found on teasers.')); |
| 33 |
|
|