Closed TomoTsuyuki closed 2 years ago
Fixing issue #436 I think there are some solutions for this...
Create new branch for MOODLE_40 and update hardcoding results. e.g. $this->assertEquals('1MB - 2MB', $actual); => $this->assertEquals('1.0 MB - 2.0 MB', $actual);
Use master branch and use regex to have both results. e.g. $this->assertMatchesRegularExpression('/^(1MB - 2MB|1.0 MB - 2.0 MB)$/', $actual);
Use master branch and use function to set $expect e.g. $this->assertEquals(display_size(pow(2, 20) . ' - ' . display_size(pow(2, 20)*2), $actual);
I made PR using option 3.
+1 for this once its green
All green now, I just merged it. Thank you :)
Fixing issue #436 I think there are some solutions for this...
Create new branch for MOODLE_40 and update hardcoding results. e.g. $this->assertEquals('1MB - 2MB', $actual); => $this->assertEquals('1.0 MB - 2.0 MB', $actual);
Use master branch and use regex to have both results. e.g. $this->assertMatchesRegularExpression('/^(1MB - 2MB|1.0 MB - 2.0 MB)$/', $actual);
Use master branch and use function to set $expect e.g. $this->assertEquals(display_size(pow(2, 20) . ' - ' . display_size(pow(2, 20)*2), $actual);
I made PR using option 3.