diff --git a/lib/tests/csvclass_test.php b/lib/tests/csvclass_test.php
index 4ab71c0e5fb..55e84d14e67 100644
--- a/lib/tests/csvclass_test.php
+++ b/lib/tests/csvclass_test.php
@@ -15,7 +15,7 @@
// along with Moodle. If not, see
and also contains ""double quotes""
",Yebisu '; - $this->teststring2 = 'fullname,"description of things",beer + $this->teststring2 = 'fullname,"description of things",beer "Fred Flint","Find the stone inside the box
",Asahi,"A fourth column" "Sarah Smith","How are the people next door?
,Yebisu,"Forget the next" '; - $this->teststring4 = 'fullname,"description of things",beer + $this->teststring4 = 'fullname,"description of things",beer "Douglas Dirk","I am fine, thankyou.
",Becks "Addelyn Francis","Thanks for the cake
",Becks @@ -86,10 +86,10 @@ class csvclass_testcase extends advanced_testcase { $csvexport->add_data($data); } $csvoutput = $csvexport->print_csv_data(true); - $this->assertEquals($csvoutput, $this->teststring); + $this->assertSame($csvoutput, $this->teststring); $test_data = csv_export_writer::print_array($this->testdata, 'comma', '"', true); - $this->assertEquals($test_data, $this->teststring); + $this->assertSame($test_data, $this->teststring); // Testing that the content is imported correctly. $iid = csv_import_reader::get_new_iid('lib'); @@ -103,7 +103,7 @@ class csvclass_testcase extends advanced_testcase { } $csvimport->cleanup(); $csvimport->close(); - $this->assertEquals($dataset, $this->testdata); + $this->assertSame($dataset, $this->testdata); // Testing for the wrong count of columns. $errortext = get_string('csvweirdcolumns', 'error'); @@ -113,9 +113,9 @@ class csvclass_testcase extends advanced_testcase { $importerror = $csvimport->get_error(); $csvimport->cleanup(); $csvimport->close(); - $this->assertEquals($importerror, $errortext); + $this->assertSame($importerror, $errortext); - // Testing for empty content + // Testing for empty content. $errortext = get_string('csvemptyfile', 'error'); $iid = csv_import_reader::get_new_iid('lib'); @@ -124,7 +124,7 @@ class csvclass_testcase extends advanced_testcase { $importerror = $csvimport->get_error(); $csvimport->cleanup(); $csvimport->close(); - $this->assertEquals($importerror, $errortext); + $this->assertSame($importerror, $errortext); // Testing for a tab separated file. // The tab separated file has a trailing tab and extra blank lines at the end of the file.