Test all the properties included in the response, like breadcrumbs, metatags, layout etc.
Example of how to perform get request and check response data can be found in LupusCeRendererContentTest::testDefaultContentFormat()
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3267729-7-api-data-tests.patch | 2.74 KB | ciprian.stavovei |
| #4 | 3267729-4-api-data-tests.patch | 2.8 KB | ciprian.stavovei |
| #2 | 3267729-2-api-data-tests.patch | 2.99 KB | ciprian.stavovei |
Comments
Comment #2
ciprian.stavovei commentedComment #3
fagotest case looks mostly good, but i don't think mink expectation exceptions should be used from within phpunit. it would probably work as an exception woudl break it, but it'S not the proper way of failing a test in phpunit.
check https://api.drupal.org/api/drupal/vendor%21phpunit%21phpunit%21src%21Fra... and related assertoin helpers.
Comment #4
ciprian.stavovei commentedI updated the patch according to feedback.
Comment #5
ciprian.stavovei commentedComment #6
mostepaniukvm@ciprian.stavovei looks good now. Minor fixes needed for indentation, phpcs is not happy
Comment #7
ciprian.stavovei commentedFixed the phpcs issues.
Comment #9
mostepaniukvm@ciprian.stavovei looks good now, committed