Answers.Body: <p>Got testing working by requiring the tests/bootstrap.php  (not app/bootstrap) like here: <a href="https://github.com/selvinortiz/craft.loath/blob/master/tests/run.sh#L6" rel="nofollow">https://github.com/selvinortiz/craft.loath/blob/master/tests/run.sh#L6</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-12-11T05:58:08.887Z
Answers.LastActivityDate: 2014-12-11T05:58:08.887Z
Answers.UserDisplayName: Luke Holder
Body: <p>I am using a testing library and while trying to load Craft through bootstrap with:</p>
  
  <pre><code>$craft = require '&lt;full path here to&gt;/app/bootstrap.php';
  </code></pre>
  
  <p>(but with the real path)</p>
  
  <p>I dumped the error to a html file from the console and get this:</p>
  
  <p><img src="https://dl.dropboxusercontent.com/s/uc89jpwf3zwf68f/2014-10-03%20at%206.57%20pm%202x.png" alt=""></p>
  
  <p>I see that Ben Parizek got a similar error (but i don't believe it was while using bootstrap only from the command line) in <a href="https://craftcms.stackexchange.com/questions/2081/undefined-property-craft-webapprequest">this question</a>.</p>
  
  <p>I tried setting cache to file in general.php and also cleared all caches in craft.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-03T16:24:35.627Z
Comments.Text: Can you set a breakpoint in WebApp::init() and make sure that method is getting called?
Comments.UserDisplayName: Brandon Kelly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-03T17:58:58.673Z
Comments.Text: I'm guessing there is some other error that's occurring and is getting swallowed by this error. Can you xDebug it?
Comments.UserDisplayName: Brad Bell
Tags: <bootstrap-craft>
Title: Getting error when using bootstrap: Craft\WebApp::$request
ThreadText: # Getting error when using bootstrap: Craft\WebApp::$request
  
  (Asked by: username_0 on 2014-10-03)
  
  I am using a testing library and while trying to load Craft through bootstrap with:
  
  ```
  $craft = require '<full path here to>/app/bootstrap.php';
  
  ```
  
  (but with the real path)
  
  I dumped the error to a html file from the console and get this:
  
  ![](https://dl.dropboxusercontent.com/s/uc89jpwf3zwf68f/2014-10-03%20at%206.57%20pm%202x.png)
  
  I see that Ben Parizek got a similar error (but i don't believe it was while using bootstrap only from the command line) in [this question](https://craftcms.stackexchange.com/questions/2081/undefined-property-craft-webapprequest).
  
  I tried setting cache to file in general.php and also cleared all caches in craft.
  
  **Tags:** bootstrap-craft
  
  > **Comments:**
  > **username_1**: Can you set a breakpoint in WebApp::init() and make sure that method is getting called?  
  > **username_2**: I'm guessing there is some other error that's occurring and is getting swallowed by this error. Can you xDebug it?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2014-12-11. Score: 1 | Accepted answer
  
  Got testing working by requiring the tests/bootstrap.php (not app/bootstrap) like here: <https://github.com/selvinortiz/craft.loath/blob/master/tests/run.sh#L6>
  
  
  ---
  
  