/[drupal]/contributions/modules/stumble/stumble.test
ViewVC logotype

Diff of /contributions/modules/stumble/stumble.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2, Fri Nov 28 19:10:17 2008 UTC revision 1.1.2.3, Wed Dec 24 14:13:46 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: stumble.test,v 1.1.2.1 2008/11/10 06:37:24 davereid Exp $  // $Id: stumble.test,v 1.1.2.2 2008/11/28 19:10:17 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 27  class StumbleTestCase extends DrupalWebT Line 27  class StumbleTestCase extends DrupalWebT
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 = '<a href="'. url('stumble', array('query' => "nid={$node->nid}&amp;type={$node->type}")) .'" title="'. t('View a random page on this site.') .'" class="stumble">'. t('Stumble') .'</a>';      $stumble_link = '<a href="'.
     //'query' => array('nid' => $node->nid, 'type' => $node->type)  
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    
# Line 64  class StumbleTestCase extends DrupalWebT Line 63  class StumbleTestCase extends DrupalWebT
63      for ($i = 0; $i < 8; $i++) {      for ($i = 0; $i < 8; $i++) {
64        $this->drupalGet('stumble');        $this->drupalGet('stumble');
65        foreach ($nodes as &$node) {        foreach ($nodes as &$node) {
66          if ($this->getUrl() == url('node/'. $node->nid, array('absolute' => TRUE))) {          if ($this->get);
           if ($i < 4) {  
             $this->assertTrue($node->unread, t('Node was unread.'));  
67              $node->unread = FALSE;              $node->unread = FALSE;
68            }            }
69            else {            else {

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.2