Skip to content

Commit c3438c1

Browse files
committed
updated
1 parent 9f4cd02 commit c3438c1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

_posts/2018-09-24-codeception-2.5.markdown

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let's assume you have such JSON response.
3636
}
3737
```
3838

39-
And you want to check that phone number type is the same on each run.
39+
And you want to check that phone numbers are the same on each run.
4040
For this we can use a snapshot.
4141

4242
```php
@@ -54,7 +54,8 @@ class PhoneNumberSnapshot extends Codeception\Snapshot {
5454

5555
protected function fetchData()
5656
{
57-
return $this->i->grabDataFromResponseByJsonPath('$.phoneNumbers[*].type');
57+
// return an array of phone numbers
58+
return $this->i->grabDataFromResponseByJsonPath('$.phoneNumbers[*].number');
5859
}
5960

6061
}
@@ -108,7 +109,7 @@ These could be a very cool features but they can't be made without your help.
108109
If you are interested consider sponsoring us:
109110

110111
<p class="text-center">
111-
<a href="https://docs.google.com/forms/d/e/1FAIpQLSeVJWu2HJTjAE81SLiYJ1xqxAXeNNSCR_GO9R0_4CKka_nFvA/viewform?usp=send_form" class="btn btn-lg btn-warning" role="button">Sponsor Codeception</a></p>
112+
<a href="https://docs.google.com/forms/d/e/1FAIpQLSeVJWu2HJTjAE81SLiYJ1xqxAXeNNSCR_GO9R0_4CKka_nFvA/viewform?usp=send_form" class="btn btn-lg btn-success" role="button">Sponsor Codeception</a></p>
112113

113114
Yes, we also provide [enterprise support](http://sdclabs.com/codeception?utm_source=codeception.com&utm_medium=top_menu&utm_term=link&utm_campaign=reference) and [trainings](http://sdclabs.com/trainings?utm_source=codeception.com&utm_medium=top_menu&utm_term=link&utm_campaign=reference). This is another way you can support the development. Thank you!
114115

0 commit comments

Comments
 (0)