Permalink
Browse files

MDL-8249 - tests: fix breaking unit tests

  • Loading branch information...
danpoltawski committed Jul 10, 2012
1 parent 029be09 commit 315e96820941319777c32341e341ea604ec6d7bc
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tests/accesslib_test.php
@@ -1326,11 +1326,11 @@ public function test_get_user_roles_in_course() {
$user3 = $this->getDataGenerator()->create_user();
$roles = get_user_roles_in_course($user1->id, $course->id);
$this->assertEquals(1, preg_match_all('/,/', $roles));
$this->assertEquals(1, preg_match_all('/,/', $roles, $matches));
$this->assertTrue(strpos($roles, role_get_name($teacherrole, $coursecontext)) !== false);
$roles = get_user_roles_in_course($user2->id, $course->id);
$this->assertEquals(0, preg_match_all('/,/', $roles));
$this->assertEquals(0, preg_match_all('/,/', $roles, $matches));
$this->assertTrue(strpos($roles, role_get_name($studentrole, $coursecontext)) !== false);
$roles = get_user_roles_in_course($user3->id, $course->id);

0 comments on commit 315e968

Please sign in to comment.