Skip to content

Commit

Permalink
MOODLE_310_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
ewallah committed Sep 9, 2020
1 parent 9e2de60 commit 2b5b23f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
- env: DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE
- env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
- env: DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE
- php: 7.4
env: DB=mysqli MOODLE_BRANCH=master

Expand All @@ -44,6 +45,7 @@ install:
- moodle-plugin-ci install

script:
- cd moodle
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
Expand All @@ -56,12 +58,12 @@ script:
- moodle-plugin-ci phpunit --coverage-text --coverage-clover
- moodle-plugin-ci behat
- moodle-plugin-ci behat --profile chrome
- php /home/travis/build/moodle/admin/tool/behat/cli/init.php -a="classic"
- php admin/tool/behat/cli/init.php -a="classic"
- moodle-plugin-ci behat --suite="classic"
- moodle-plugin-ci behat --suite="classic" --profile chrome
- moodle-plugin-ci behat --suite="classic" --profile chrome --dump /home/travis/build/moodle/blocks/admin_bookmarks
- /home/travis/build/moodle/vendor/bin/phpunit "provider_testcase" /home/travis/build/moodle/privacy/tests/provider_test.php
- /home/travis/build/moodle/vendor/bin/phpunit "tool_dataprivacy_expired_contexts_testcase" /home/travis/build/moodle/admin/tool/dataprivacy/tests/expired_contexts_test.php
- vendor/bin/phpunit "provider_testcase" privacy/tests/provider_test.php
- vendor/bin/phpunit "tool_dataprivacy_expired_contexts_testcase" admin/tool/dataprivacy/tests/expired_contexts_test.php

after_success:
- moodle-plugin-ci coveralls-upload
5 changes: 1 addition & 4 deletions tests/condition_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ public function test_save() {

/**
* Tests the get_description and get_standalone_description functions.
* @coversDefaultClass availability_coursecompleted\condition
* @coversDefaultClass availability_coursecompleted\frontend
*/
public function test_get_description() {
Expand Down Expand Up @@ -225,6 +224,7 @@ public function test_page() {
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
$ccompletion = new completion_completion(['course' => $course->id, 'userid' => $user->id]);
$ccompletion->mark_complete();
rebuild_course_cache($course->id, true);
$this->assertFalse($cond->is_available(true, $info, true, $user->id));
$this->assertFalse($cond->is_available(true, $info, false, $user->id));
$this->assertTrue($cond->is_available(false, $info, false, $user->id));
Expand All @@ -245,9 +245,6 @@ public function test_page() {
*/
public function test_other() {
global $CFG;
$this->resetAfterTest();
$this->setAdminUser();
$CFG->enableavailability = true;
$condition = \availability_coursecompleted\condition::get_json('3');
$this->assertEquals($condition, (object)['type' => 'coursecompleted', 'id' => '3']);
$condition = \availability_coursecompleted\condition::get_json('0');
Expand Down

0 comments on commit 2b5b23f

Please sign in to comment.