From 41aef912af6a0772f59871481f57e77329629330 Mon Sep 17 00:00:00 2001
From: Bob Vincent <bobvin@pillars.net>
Date: Thu, 30 Jun 2011 14:20:08 -0400
Subject: [PATCH] Issue #1136820 by mikey_p, catch: Allow drupal_get_filename() to work for the installed profile. (test-only patch)

---
 modules/simpletest/tests/bootstrap.test |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/modules/simpletest/tests/bootstrap.test b/modules/simpletest/tests/bootstrap.test
index 14c16a95b6d0c4e694ca01a53615fb472b58b1f7..93ba67f8271cef0fa88c0736135314702f1e63a9 100644
--- a/modules/simpletest/tests/bootstrap.test
+++ b/modules/simpletest/tests/bootstrap.test
@@ -327,7 +327,7 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
 
   public static function getInfo() {
     return array(
-      'name' => 'Get filename test',
+      'name' => 'Get filename without database',
       'description' => 'Test that drupal_get_filename() works correctly when the file is not found in the database.',
       'group' => 'Bootstrap',
     );
@@ -355,6 +355,23 @@ class BootstrapGetFilenameTestCase extends DrupalUnitTestCase {
   }
 }
 
+class BootstrapDrupalGetFileNameDatabaseTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'Get filename with database',
+      'description' => 'Test that drupal_get_filename() works with the database available',
+      'group' => 'Bootstrap',
+    );
+  }
+
+  /**
+   * Test drupal_get_filename() with an install profile.
+   */
+  function testDrupalGetFilenameInstallProfile() {
+    $this->assertIdentical(drupal_get_filename('profile', 'standard'), 'profiles/standard/standard.profile', t('Retrieve install profile location.'));
+  }
+}
+
 class BootstrapTimerTestCase extends DrupalUnitTestCase {
 
   public static function getInfo() {
-- 
1.7.4.1

