File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 99 fail-fast : false
1010 matrix :
1111 include :
12+ - php : ' 8.0'
13+ moodle-branch : ' master'
14+ database : ' pgsql'
1215 - php : ' 7.4'
13- moodle-branch : ' MOODLE_400_STABLE '
16+ moodle-branch : ' MOODLE_401_STABLE '
1417 database : ' pgsql'
1518 - php : ' 7.3'
1619 moodle-branch : ' MOODLE_400_STABLE'
1720 database : ' mariadb'
1821
1922 services :
2023 postgres :
21- image : postgres:10
24+ image : postgres:13
2225 env :
2326 POSTGRES_USER : ' postgres'
2427 POSTGRES_HOST_AUTH_METHOD : ' trust'
@@ -119,7 +122,7 @@ jobs:
119122 run : moodle-plugin-ci mustache
120123
121124 - name : Grunt
122- if : ${{ always() }}
125+ if : ${{ matrix.moodle-branch == 'MOODLE_400_STABLE' }}
123126 run : moodle-plugin-ci grunt
124127
125128 - name : PHPUnit tests
Original file line number Diff line number Diff line change 3939class phpquestions_test extends \qtype_coderunner_testcase {
4040
4141 public function test_good_sqr_function () {
42+ $ this ->check_language_available ('php ' );
4243 $ q = $ this ->make_question ('sqrphp ' );
4344 $ response = array ('answer ' => "<?php \nfunction sqr( \$n) { return \$n * \$n; } \n" );
4445 list ($ mark , $ grade , $ cache ) = $ q ->grade_response ($ response );
@@ -52,6 +53,7 @@ public function test_good_sqr_function() {
5253
5354
5455 public function test_bad_sqr_function () {
56+ $ this ->check_language_available ('php ' );
5557 $ q = $ this ->make_question ('sqrphp ' );
5658 $ response = array ('answer ' => "<?php \nfunction sqr( \$n) { return \$n; } \n" );
5759 list ($ mark , $ grade , $ cache ) = $ q ->grade_response ($ response );
@@ -65,6 +67,7 @@ public function test_bad_sqr_function() {
6567
6668
6769 public function test_bad_syntax () {
70+ $ this ->check_language_available ('php ' );
6871 $ q = $ this ->make_question ('sqrphp ' );
6972 $ response = array ('answer ' => "<?php \nfunction sqr( \$n) { return \$n \n" );
7073 list ($ mark , $ grade , $ cache ) = $ q ->grade_response ($ response );
Original file line number Diff line number Diff line change 2424 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2525 */
2626
27- use qtype_coderunner \constants ;
28-
2927namespace qtype_coderunner ;
3028
3129defined ('MOODLE_INTERNAL ' ) || die ();
You can’t perform that action at this time.
0 commit comments