Skip to content
Snippets Groups Projects
Commit 7063158f authored by Elliot Ward's avatar Elliot Ward
Browse files

#3092722: :white_check_mark: explicitly return coide from test setUp() functions. Replace use...

#3092722: :white_check_mark: explicitly return coide from test setUp() functions. Replace use of assertRaw() with assertSession()->responseContains(). Fix assumption that field__item class will be applied to field items now we are using stark to run the tests.
parent f2345e5c
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ abstract class JsonApiReferenceFieldBase extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
protected function setUp(): void {
parent::setUp();
// Create a content type to test with.
......
......@@ -26,7 +26,7 @@ class JsonApiReferenceFieldFormatterTest extends JsonApiReferenceFieldBase {
/**
* {@inheritdoc}
*/
protected function setUp() {
protected function setUp(): void {
parent::setUp();
\Drupal::service('config.storage')
......@@ -55,7 +55,7 @@ class JsonApiReferenceFieldFormatterTest extends JsonApiReferenceFieldBase {
$this->drupalGet('node/' . $this->referenceContent->id());
$this->assertSession()->statusCodeEquals(200);
$this->assertRaw($this->referencedContent->uuid());
$this->assertSession()->responseContains($this->referencedContent->uuid());
$this->drupalLogout();
}
......@@ -68,7 +68,7 @@ class JsonApiReferenceFieldFormatterTest extends JsonApiReferenceFieldBase {
$this->drupalGet('node/' . $this->referenceContent->id());
$this->assertSession()->statusCodeEquals(200);
$this->assertRaw($this->referencedContent->label());
$this->assertSession()->responseContains($this->referencedContent->label());
$this->drupalLogout();
}
......@@ -81,7 +81,7 @@ class JsonApiReferenceFieldFormatterTest extends JsonApiReferenceFieldBase {
$this->drupalGet('node/' . $this->referenceContent->id());
$this->assertSession()->statusCodeEquals(200);
$this->assertRaw($this->referencedContent->label() . ' (' . $this->referencedContent->uuid() . ')');
$this->assertSession()->responseContains($this->referencedContent->label() . ' (' . $this->referencedContent->uuid() . ')');
$this->drupalLogout();
}
......@@ -96,7 +96,7 @@ class JsonApiReferenceFieldFormatterTest extends JsonApiReferenceFieldBase {
$this->drupalGet('node/' . $this->referenceContent->id());
$this->assertSession()->statusCodeEquals(200);
$this->assertRaw('<div class="field__item">' . $this->referencedContent->id() . '</div>');
$this->assertSession()->responseContains('<div>1</div>');
$this->drupalLogout();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment