Skip to content

Commit

Permalink
unit tests updates - now there are 100% passes
Browse files Browse the repository at this point in the history
  • Loading branch information
alon1980 committed Feb 23, 2020
1 parent 55e2cde commit c168040
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions local/kaltura/tests/locallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -998,9 +998,9 @@ public function test_local_kaltura_get_kaf_publishing_data_for_non_admin() {

$result = local_kaltura_get_kaf_publishing_data();

$json = '{"courses":[{"courseId":"'.$courseone->id.'","courseName":"'.$courseone->fullname.'","roles":"Instructor"}';
$json .= ',{"courseId":"'.$coursetwo->id.'","courseName":"'.$coursetwo->fullname.'","roles":"Learner"}';
$json .= ',{"courseId":"'.$coursefour->id.'","courseName":"'.$coursefour->fullname.'","roles":"Instructor"}]}';
$json = '{"courses":[{"courseId":"'.$courseone->id.'","courseName":"'.$courseone->fullname.'","courseShortName":"'.$courseone->shortname.'","roles":"Instructor"}';
$json .= ',{"courseId":"'.$coursetwo->id.'","courseName":"'.$coursetwo->fullname.'","courseShortName":"'.$coursetwo->shortname.'","roles":"Learner"}';
$json .= ',{"courseId":"'.$coursefour->id.'","courseName":"'.$coursefour->fullname.'","courseShortName":"'.$coursefour->shortname.'","roles":"Instructor"}]}';

$this->assertEquals(base64_encode($json), $result);
}
Expand Down Expand Up @@ -1041,10 +1041,10 @@ public function test_local_kaltura_get_kaf_publishing_data_for_admin() {

$result = local_kaltura_get_kaf_publishing_data();

$json = '{"courses":[{"courseId":"'.$courseone->id.'","courseName":"'.$courseone->fullname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursetwo->id.'","courseName":"'.$coursetwo->fullname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursethree->id.'","courseName":"'.$coursethree->fullname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursefour->id.'","courseName":"'.$coursefour->fullname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}]}';
$json = '{"courses":[{"courseId":"'.$courseone->id.'","courseName":"'.$courseone->fullname.'","courseShortName":"'.$courseone->shortname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursetwo->id.'","courseName":"'.$coursetwo->fullname.'","courseShortName":"'.$coursetwo->shortname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursethree->id.'","courseName":"'.$coursethree->fullname.'","courseShortName":"'.$coursethree->shortname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}';
$json .= ',{"courseId":"'.$coursefour->id.'","courseName":"'.$coursefour->fullname.'","courseShortName":"'.$coursefour->shortname.'","roles":"urn:lti:sysrole:ims\/lis\/Administrator"}]}';

$this->assertEquals(base64_encode($json), $result);
}
Expand Down

0 comments on commit c168040

Please sign in to comment.