- Issue created by @bbrala
- Assigned to nexusnovaz
- Merge request !8189Issue #3449891: Removed old expected document and assertResourceResponse and... → (Closed) created by nexusnovaz
- Issue was unassigned.
- Status changed to Needs work
7 months ago 1:44pm 26 May 2024 - 🇬🇧United Kingdom nexusnovaz
Hi, i think the Remaining tasks needs to be revised. I've removed the old test and uncommented the new one. The test can be viewed here with a failure.
- 🇳🇱Netherlands bbrala Netherlands
If you look at the arguments for
assertResourceErrorResponse
you see that your arguments to not correcpond with the right ones. The $response variable is in the wrong position. Check out the function arguments, and you should be able to fix that pretty easily by adding a NULL as the $via_link argument. :) - 🇬🇧United Kingdom nexusnovaz
Hi @bbrala,
I'm unable to get the test to pass. I'm getting the following fail message with $url:
PHPUnit 9.6.19 by Sebastian Bergmann and contributors. Runtime: PHP 8.1.27 Configuration: ./core/phpunit.xml.dist Testing Drupal\Tests\jsonapi\Functional\NodeTest .F.......... 12 / 12 (100%) Time: 01:16.183, Memory: 6.00 MB There was 1 failure: 1) Drupal\Tests\jsonapi\Functional\NodeTest::testGetIndividual The 'errors' member was not as expected. Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ 1 => 'Forbidden' 2 => 'The current user is not allow...ource.' 3 => Array ( - 0 => Array (...) - 1 => Array (...) + 0 => '/data' ) + 4 => Array (...) ) )
Or the following error message with NULL:
PHPUnit 9.6.19 by Sebastian Bergmann and contributors. Runtime: PHP 8.1.27 Configuration: ./core/phpunit.xml.dist Testing Drupal\Tests\jsonapi\Functional\NodeTest .F.......... 12 / 12 (100%) Time: 01:17.307, Memory: 6.00 MB There was 1 failure: 1) Drupal\Tests\jsonapi\Functional\NodeTest::testGetIndividual The 'errors' member was not as expected. Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ 1 => 'Forbidden' 2 => 'The current user is not allow...ource.' 3 => Array ( - 0 => Array (...) + 0 => '/data' ) + 4 => Array (...) ) )
As im unsure what to do, ill leave this for someone else and check up once complete to learn from the solution.
- First commit to issue fork.
- Status changed to Needs review
7 months ago 2:21pm 5 June 2024 - 🇮🇳India manish-31
MR has been updated, fixed PHPUnit tests errors. Needs review.
- Status changed to RTBC
7 months ago 7:07pm 7 June 2024 - 🇺🇸United States smustgrave
Seems straightforward
Just fyi @manish-31 this was tagged for novice/new users. Looking at your post history of multiple pages believe are good to work on non-novice level issues.
- Status changed to Fixed
7 months ago 10:05pm 7 June 2024 - 🇬🇧United Kingdom longwave UK
Committed and pushed 6f6fabe2e6b to 11.x and a83ff827fd4 to 11.0.x and bccb004ae24 to 10.4.x and 389f46becaa to 10.3.x. Thanks!
-
longwave →
committed 3fd288da on 10.3.x
Issue #3449891 by NexusNovaz, manish-31, bbrala: Move to new test path...
-
longwave →
committed 3fd288da on 10.3.x
-
longwave →
committed f5ecdb8f on 10.4.x
Issue #3449891 by NexusNovaz, manish-31, bbrala: Move to new test path...
-
longwave →
committed f5ecdb8f on 10.4.x
-
longwave →
committed 1dd4e982 on 11.0.x
Issue #3449891 by NexusNovaz, manish-31, bbrala: Move to new test path...
-
longwave →
committed 1dd4e982 on 11.0.x
-
longwave →
committed 11ce3c83 on 11.x
Issue #3449891 by NexusNovaz, manish-31, bbrala: Move to new test path...
-
longwave →
committed 11ce3c83 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.