tests/src/Functional/JsonApiRegressionTest.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/src/Functional/JsonApiRegressionTest.php b/tests/src/Functional/JsonApiRegressionTest.php index cc46d58..a640635 100644 --- a/tests/src/Functional/JsonApiRegressionTest.php +++ b/tests/src/Functional/JsonApiRegressionTest.php @@ -2,12 +2,12 @@ namespace Drupal\Tests\jsonapi\Functional; -use Drupal\comment\CommentInterface; use Drupal\comment\Entity\Comment; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\comment\Tests\CommentTestTrait; use Drupal\Core\Url; use Drupal\taxonomy\Entity\Term; +use GuzzleHttp\RequestOptions; /** * JSON API regression tests. @@ -24,7 +24,7 @@ class JsonApiRegressionTest extends JsonApiFunctionalTestBase { /** * Ensure filtering on relationships works with bundle-specific target types. * - * @see https://www.drupal.org/node/2698811 + * @see https://www.drupal.org/project/jsonapi/issues/2953207 */ public function testBundleSpecificTargetEntityType_2953207() { // Set up data model. @@ -37,21 +37,19 @@ class JsonApiRegressionTest extends JsonApiFunctionalTestBase { 'name' => 'foobar', 'vid' => 'tags', ])->save(); - $comment = Comment::create([ + Comment::create([ 'subject' => 'Llama', 'entity_id' => 1, 'entity_type' => 'taxonomy_term', 'field_name' => 'comment', - 'status' => CommentInterface::PUBLISHED, - ]); - $comment->save(); + ])->save(); // Test. $user = $this->drupalCreateUser([ 'access comments', ]); $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/tcomment?include=entity_id&filter[entity_id.name]=foobar'), [ - 'auth' => [ + RequestOptions::AUTH => [ $user->getUsername(), $user->pass_raw, ],