Skip to content

Commit

Permalink
MDL-61976 mod_wiki: Trim returned value to avoid EOF-related failures
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao authored and junpataleta committed May 10, 2018
1 parent 9db4483 commit a586c08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/wiki/tests/privacy_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ public function test_export_user_data2() {

// This user was the last one to modify this page, so the page info is returned.
$data12 = $data[$this->pagepaths[1][2]];
$this->assertEquals('update3 <img src="files/Hamster.jpg" alt="Hamster.jpg" />', $data12['page']['cachedcontent']);
$this->assertEquals('update3 <img src="files/Hamster.jpg" alt="Hamster.jpg" />', trim($data12['page']['cachedcontent']));
// He made one revision.
$this->assertEquals(1, count($data12['revisions']));
$lastrevision = reset($data12['revisions']);
$this->assertEquals('update3 <img src="files/Hamster.jpg">', $lastrevision['content']);
$this->assertEquals('update3 <img src="files/Hamster.jpg">', trim($lastrevision['content']));

// Only one file was used in the first wiki by this user - Hamster.jpg.
$files = writer::with_context($this->contexts[1])->get_files([$this->subwikis[1]]);
Expand Down

0 comments on commit a586c08

Please sign in to comment.