Skip to content

Commit 42e786d

Browse files
authored
Fix issue #12 related to behat tests (#13)
* Fix config_is_valid checks when config is empty * Fix private final method in tests (we should not make a private method final)
1 parent 702089a commit 42e786d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

block_rss_thumbnails.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ public function config_is_valid(): bool {
213213
if (empty($this->config)) {
214214
return false;
215215
}
216-
if (!is_integer($this->config->carousseldelay)) {
216+
if (empty($this->config->carousseldelay) || !is_integer($this->config->carousseldelay)) {
217217
return false;
218218
}
219-
if (!is_integer($this->config->numentries)) {
219+
if (empty($this->config->numentries) || !is_integer($this->config->numentries)) {
220220
return false;
221221
}
222222
if (!$this->config->title) {

tests/block_rss_thumbnails_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function test_get_feed_items() {
182182
*
183183
* @return array[]
184184
*/
185-
final private function get_expected_items() {
185+
private function get_expected_items() {
186186
return [
187187
[
188188
"id" => "https://www.imt.fr/?p=89572",

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
defined('MOODLE_INTERNAL') || die();
2626

27-
$plugin->version = 2022120901; // The current plugin version (Date: YYYYMMDDXX).
27+
$plugin->version = 2023020200; // The current plugin version (Date: YYYYMMDDXX).
2828
$plugin->requires = 2012112900; // Requires this Moodle version.
2929
$plugin->release = 1.2;
3030
$plugin->maturity = MATURITY_STABLE;

0 commit comments

Comments
 (0)