Skip to content

Commit

Permalink
behat: Fix deprecated steps in M4.4 #817650
Browse files Browse the repository at this point in the history
  • Loading branch information
tai.letan authored and sammarshallou committed Oct 21, 2024
1 parent a7799e6 commit 0941359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2694,8 +2694,7 @@ function oublog_add_comment_moderated($oublog, $oubloginstance, $post, $comment)
'commenter' => $commenterhtml,
'commenttitle' => $comment->title ? $comment->title : '',
'comment' =>
format_text($comment->message, FORMAT_MOODLE,
null, $oublog->course),
format_text($comment->message, FORMAT_MOODLE),
'approvelink' => $approvebase . '&approve=1',
'approvetext' => get_string('moderated_approve', 'oublog'),
'rejectlink' => $approvebase . '&approve=0',
Expand Down
7 changes: 3 additions & 4 deletions tests/behat/sharedblog.feature
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,17 @@ Feature: Test shared data from Master blog on OUBlog
@javascript @_file_upload
Scenario: Fail to create child blog because wrong ID number.
When I am on "Course 1" course homepage
And I add a "OU blog" to section "0" and I fill the form with:
And I add an oublog activity to course "Course 1" section "0" and I fill the form with:
| Blog name | Child Blog 2 |
| Intro | Can not create this blog |
| Individual blogs | Visible individual blogs |
| Shared blog | masterblog3 |
Then I press "Save and display"
And I should see "No matching ID number"

@javascript @_file_upload
Scenario: Fail to create child blog because that blog is child of the other.
When I am on "Course 1" course homepage
And I add a "OU blog" to section "0" and I fill the form with:
And I add an oublog activity to course "Course 1" section "0" and I fill the form with:
| Blog name | Child Blog 3 |
| Intro | Can not create this blog |
| Individual blogs | Visible individual blogs |
Expand Down Expand Up @@ -306,7 +305,7 @@ Feature: Test shared data from Master blog on OUBlog
| activity | name | intro | course | individual | idsharedblog | idnumber |
| oublog | Child Blog | A blog get content from master | C1 | 2 | masterblog | childblog |
When I am on "Course 1" course homepage
And I add a "OU blog" to section "0" and I fill the form with:
And I add an oublog activity to course "Course 1" section "0" and I fill the form with:
| Blog name | Child Blog 3 |
| Intro | Can not create this blog |
| Individual blogs | Visible individual blogs |
Expand Down

0 comments on commit 0941359

Please sign in to comment.