Index: taxonews.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonews/Attic/taxonews.test,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 taxonews.test
--- taxonews.test	26 Jun 2010 16:54:41 -0000	1.1.2.7
+++ taxonews.test	14 Jan 2011 17:48:32 -0000
@@ -596,3 +596,52 @@ class TaxonewsThemeUnitTest extends Taxo
     $this->assertTrue(strpos($matches[2], $title) !== FALSE, t('Title found in "More" link text'), self::$group);
   }
 }
+
+class TaxonewsFunctionalTest extends TaxonewsTimedTestCase {
+
+  static public function getInfo() {
+    $ret = array(
+      'name'        => t('Functional'),
+      'description' => t('Browser tests'),
+      'group'       => t('Taxonews'),
+    );
+    return $ret;
+  }
+
+  // Only way to initialize static properties to non constant content
+  public function __construct($test_id) {
+    parent::__construct($test_id);
+    self::$group = t('Bug #1025524');
+  }
+
+  public function setUp() {
+    parent::setUp('taxonomy', 'taxonews');
+  }
+
+  // Test installer warning on unconfigured module
+  function testInstallLink() {
+    $admin = $this->drupalCreateUser(array('administer blocks', 'administer site configuration'));
+    $this->drupalLogin($admin);
+    $this->pass(t('Testing with clean URLs'), self::$group);
+    $clean = variable_get('clean_url', 0);
+    variable_set('clean_url', 1);
+    $this->drupalGet('admin/build/block');
+    $this->assertLink('INSTALL.txt', 0, t('Found INSTALL.txt link'), self::$group);
+    $this->clickLink('INSTALL.txt');
+    $this->assertResponse(200, t('INSTALL.txt link returned 200'));
+
+    $this->pass(t('Testing without clean URLs'), self::$group);
+    variable_set('clean_url', 0);
+    $this->drupalGet('admin/build/block');
+    $this->assertLink('INSTALL.txt', 0, t('Found INSTALL.txt link'), self::$group);
+    // Cannot use clickLink or even url() without clean URLs until #1027210 is fixed
+    $url_before = $this->getUrl();
+    $links = $this->xpath('//a[text()="INSTALL.txt"]');
+    $link = (string) $links[0]['href'];
+    $base = url('<front>', array('absolute' => TRUE));
+    $path = $base . $link; // This is a file: do NOT trigger clean URLs rewriting
+    $this->drupalGet($path);
+    $this->assertResponse(200, t('INSTALL.txt link returned 200'));
+    variable_set('clean_url', $clean);
+  }
+}
