Skip to content

Commit a017c42

Browse files
committed
updated guides for v5
1 parent 01d0e6d commit a017c42

File tree

4 files changed

+293
-403
lines changed

4 files changed

+293
-403
lines changed

guides/06-Debugging.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ By looking into the following debugging practices you will learn how to get all
99
Codeception provides `codecept_debug` function to print a debug output when running test.
1010
Think of it as `var_dump` but for testing:
1111

12-
{% highlight php %}
12+
```php
1313
codecept_debug($user);
14-
{% endhighlight %}
14+
```
1515

1616
Unlinke var_dump, the output will be printed to screen only if tests are executed with `--debug` flag.
1717

@@ -27,13 +27,13 @@ This function is loaded only by Codeception, so the application may be broken tr
2727
Inside a [Helper](/docs/06-ModulesAndHelpers#Helpers) you can use analogs of this function to provide a debug output for a complex action.
2828

2929

30-
{% highlight php %}
30+
```php
3131
// print variable from helper
3232
$this->debug($response);
3333

3434
// print variable with a short comment
3535
$this->debugSection('Response', $response);
36-
{% endhighlight %}
36+
```
3737

3838
Codeception Modules use debug output to give more information to user about the data used by a test. For instance, in debug mode you can see request and responses body when testing REST API.
3939

@@ -44,10 +44,10 @@ When running acceptance or functional test it might be needed to pause execution
4444

4545
Writing a new acceptance from scratch can be more convenient if you hold a browser window open. It is recommended to start writing a new acceptance test with these two commands:
4646

47-
{% highlight php %}
47+
```php
4848
$I->amOnPage('/');
4949
$I->pause();
50-
{% endhighlight %}
50+
```
5151

5252
Interactive pause is launched only when `--debug ` option is enabled:
5353

@@ -57,9 +57,9 @@ php vendor/bin/codecept run --debug
5757

5858
To launch interactive pause in a context when the `$I` object is not available, use `codecept_pause` function instead. To inspect local variables pass them into interactive shell using an array:
5959

60-
{% highlight php %}
60+
```php
6161
$I->pause(['user' => $user])
6262
// or
6363
codecept_pause(['user' => $user]);
64-
{% endhighlight %}
64+
```
6565

0 commit comments

Comments
 (0)