title: PHP Fatal error: Call to undefined function content_try()
body: <p>I am new to phpunit. I want to use it with drupal( drupal.org)
  my test file in a folder called functional_test which is in the root directory
  of the site. If you wish to see the full directory structure then
  see it here <a href="http://pastebin.com/TaqGLq8u" rel="nofollow">http://pastebin.com/TaqGLq8u</a></p>
  
  <p>However when I run it I get the error:</p>
  
  <p>PHP Fatal error:  Call to undefined function content_try() in /home/vishal/Dropbox/sites/drupal_test/functional_test/index_Test.php on line 23</p>
  
  <p>I am sure index.php is getting found as the you can see the full output
  here <a href="http://pastebin.com/FVkn2ig1" rel="nofollow">http://pastebin.com/FVkn2ig1</a></p>
  
  <p>Also if I put the test file outside the functional directory in the root directory it works</p>
  
  <p>My test code is very simple:</p>
  
  <pre><code>require_once '../index.php';
  
  
  class index_Test extends PHPUnit_Framework_TestCase
  {
   public function test_content_try()
  {
      $value=content_try();
      $this-&gt;assertEquals('1', $value,'Value should be one');
  
  }
  }
  </code></pre>
  
  <p>My index.php file which I want to test is:</p>
  
  <pre><code>define('DRUPAL_ROOT', getcwd());
  
  require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  menu_execute_active_handler();
  
  
  function content_try()
  {
  
  return 1;
  }
  </code></pre>
  
  <p>I am not clear what I might be doing wrong here.</p>