Skip to content

Commit

Permalink
MDL-52777 tool_usertours: Fix matching tour test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Oct 20, 2016
1 parent c6509ee commit aea13e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions admin/tool/usertours/tests/manager_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@ public function test_get_matching_tours($alltours, $url, $expected) {
$tourconfig->id = null;
$tour = \tool_usertours\tour::load_from_record($tourconfig, true);
$tour->persist(true);

$stepconfig = (object) [
'id' => null,
'tourid' => $tour->get_id(),
'title' => '',
'content' => '',
'targettype' => \tool_usertours\target::TARGET_UNATTACHED,
'targetvalue' => '',
'sortorder' => 0,
'configdata' => '',
];
$step = \tool_usertours\step::load_from_record($stepconfig, true);
$step->persist(true);
}

$match = \tool_usertours\manager::get_matching_tours(new moodle_url($url));
Expand Down

0 comments on commit aea13e1

Please sign in to comment.