Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
5609fb8a
Commit
5609fb8a
authored
Aug 08, 2011
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a tip in the doc about how to debug tests
parent
9539480b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
doc/testing.rst
doc/testing.rst
+17
-0
No files found.
doc/testing.rst
View file @
5609fb8a
...
...
@@ -89,6 +89,23 @@ method, which returns your application. It will probably look like this::
Make sure you do **not** use ``require_once`` here, as this method will be
executed before every test.
.. tip::
By default, the application behaves in the same way as when using it from
a browser. But when an error occurs, it is sometimes easier to get raw
exceptions instead of HTML pages. It is rather simple if you tweak the
application configuration in the ``createApplication()`` method like
follows::
public function createApplication()
{
$app = require __DIR__.'/path/to/app.php';
$app['debug'] = true;
unset($app['exception_handler']);
return $app;
}
The WebTestCase provides a ``createClient`` method. A client acts as a browser,
and allows you to interact with your application. Here's how it works::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment