Skip to content
Snippets Groups Projects
Unverified Commit 83f07ce0 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3150661 by cburschka: FileFieldRSSContentTest uses XPath incorrectly

(cherry picked from commit 6b769d1e)
parent 4f61b6f6
No related branches found
No related tags found
9 merge requests!1445Issue #2920039: Views' User Name exposed group filter validation,!1298Issue #3240993: Let layout builder render inline block translations,!774Issue #3174569: Example node template file name is incorrect,!497Issue #2463967: Use .user.ini file for PHP settings,!433Resolve #3163663 "Too many open files",!233Resolve #2693787 "Taxonomy term name",!133Resolve #2666286 "Clean up menuui",!112Resolve #3187004 "Drupaldatetime serialization issue",!53Resolve #3181870: Correct typo "the the" in "core/classList" deprecation message.
...@@ -63,14 +63,13 @@ public function testFileFieldRSSContent() { ...@@ -63,14 +63,13 @@ public function testFileFieldRSSContent() {
// Check that the RSS enclosure appears in the RSS feed. // Check that the RSS enclosure appears in the RSS feed.
$this->drupalGet('rss.xml'); $this->drupalGet('rss.xml');
$uploaded_filename = str_replace('public://', '', $node_file->getFileUri());
$selector = sprintf( $selector = sprintf(
'enclosure[@url="%s"][@length="%s"][@type="%s"]', '//enclosure[@url="%s" and @length="%s" and @type="%s"]',
file_create_url("public://$uploaded_filename", ['absolute' => TRUE]), file_create_url($node_file->getFileUri()),
$node_file->getSize(), $node_file->getSize(),
$node_file->getMimeType() $node_file->getMimeType()
); );
$this->assertNotNull($this->getSession()->getDriver()->find('xpath', $selector), 'File field RSS enclosure is displayed when viewing the RSS feed.'); $this->assertNotEmpty($this->getSession()->getDriver()->find($selector), 'File field RSS enclosure is displayed when viewing the RSS feed.');
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment