<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>

CC BY-SA 3.0
2014-12-11T05:58:08.887Z
2014-12-11T05:58:08.887Z
Luke Holder
<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>

CC BY-SA 3.0
2014-10-03T16:24:35.627Z
Can you set a breakpoint in WebApp::init() and make sure that method is getting called?
Brandon Kelly
CC BY-SA 3.0
2014-10-03T17:58:58.673Z
I'm guessing there is some other error that's occurring and is getting swallowed by this error. Can you xDebug it?
Brad Bell
<bootstrap-craft>
Getting error when using bootstrap: Craft\WebApp::$request
# 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 '/app/bootstrap.php';

(but with the real path)
I dumped the error to a html file from the console and get this:

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.
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>


---

