catalyst / moodle-tool_objectfs

Object file storage system for Moodle
https://moodle.org/plugins/tool_objectfs
88 stars 72 forks source link

Fix issue#436 #466

Closed TomoTsuyuki closed 2 years ago

TomoTsuyuki commented 2 years ago

Fixing issue #436 I think there are some solutions for this...

  1. 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);

  2. Use master branch and use regex to have both results. e.g. $this->assertMatchesRegularExpression('/^(1MB - 2MB|1.0 MB - 2.0 MB)$/', $actual);

  3. 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.

brendanheywood commented 2 years ago

+1 for this once its green

TomoTsuyuki commented 2 years ago

All green now, I just merged it. Thank you :)