Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
rdebleu committed Oct 22, 2023
1 parent 454f529 commit d08fdbe
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public function search($q, $page = 1) {
'thumbnail_height' => 64,
'thumbnail_width' => 64,
'source' => $item['Key'],
'thumbnail' => $OUTPUT->image_url(file_extension_icon($pathinfo['basename']))->out(false), ];
'thumbnail' => $OUTPUT->image_url(file_extension_icon($pathinfo['basename']))->out(false),
];
}
return ['list' => $files, 'dynload' => true, 'pages' => 0, 'page' => $page];
}
Expand Down
57 changes: 57 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/phpunit/phpunit.xsd"
bootstrap="../../lib/phpunit/bootstrap.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
backupGlobals="false"
backupStaticAttributes="false"
cacheResult="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
beStrictAboutTestsThatDoNotTestAnything="false"
beStrictAboutOutputDuringTests="true"
>

<php>
<!--<const name="PHPUNIT_LONGTEST" value="1"/> uncomment to execute also slow or otherwise expensive tests-->
<const name="PHPUNIT_SEQUENCE_START" value="145000"/>

<!--Following constants instruct tests to fetch external test files from alternative location
or skip tests if empty, clone https://github.com/moodlehq/moodle-exttests to local web server-->
<!--<const name="TEST_EXTERNAL_FILES_HTTP_URL" value="http://download.moodle.org/unittest"/>
uncomment and alter to fetch external test files from alternative location-->
<!--<const name="TEST_EXTERNAL_FILES_HTTPS_URL" value="https://download.moodle.org/unittest"/>
uncomment and alter to fetch external test files from alternative location-->
</php>

<testsuites>
<testsuite name="repository_s3bucket_testsuite">
<directory suffix="_test.php">.</directory>
</testsuite>
</testsuites>

<coverage>
<include>
<directory suffix=".php">classes</directory>
<directory suffix=".php">tests/generator</directory>
<file>externallib.php</file>
<file>lib.php</file>
<file>locallib.php</file>
<file>renderer.php</file>
<file>rsslib.php</file>
</include>
<exclude>
<directory suffix=".php">tests</directory>
<directory suffix=".php">lang/en</directory>
<file>version.php</file>
<file>tests/coverage.php</file>
</exclude>
</coverage>

</phpunit>
2 changes: 1 addition & 1 deletion tests/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<php>
<!--<const name="PHPUNIT_LONGTEST" value="1"/> uncomment to execute also slow or otherwise expensive tests-->
<const name="PHPUNIT_SEQUENCE_START" value="133000"/>
<const name="PHPUNIT_SEQUENCE_START" value="145000"/>

<!--Following constants instruct tests to fetch external test files from alternative location
or skip tests if empty, clone https://github.com/moodlehq/moodle-exttests to local web server-->
Expand Down

0 comments on commit d08fdbe

Please sign in to comment.