Skip to content

Commit

Permalink
Merge pull request #120 from ocularrhythm/patch-1
Browse files Browse the repository at this point in the history
Add PHP as language in code blocks
  • Loading branch information
ericmann authored Apr 27, 2018
2 parents 6495655 + a803a74 commit 68e90e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Mocking calls to `wpdb`, `WP_Query`, etc. can be done using the [mockery](https:
#### $wpdb example

Let's say we have a function that gets three post IDs from the database.
```
```php
function get_post_ids() {
global $wpdb;
return $wpdb->get_col( "select ID from {$wpdb->posts} LIMIT 3" );
Expand All @@ -369,7 +369,7 @@ function get_post_ids() {

When we mock the `$wpdb` object, we're not performing an actual database call, only mocking the results. We need to call the `get_col` method with an SQL statement, and return three arbitrary post IDs.

```
```php
use Mockery;

function test_get_post_ids() {
Expand Down

0 comments on commit 68e90e4

Please sign in to comment.