[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/data/tests/ -> lib_test.php (summary)

Unit tests for lib.php

Copyright: 2013 Adrian Greeve
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 669 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

mod_data_lib_testcase:: (13 methods):
  test_data_delete_record()
  test_data_comment_created_event()
  test_data_comment_deleted_event()
  test_data_user_can_manage_entry_return_true_with_capability()
  test_data_user_can_manage_entry_return_false_readonly()
  test_data_user_can_manage_entry_return_false_no_record()
  test_data_user_can_manage_entry_return_false_not_owned_record()
  test_data_user_can_manage_entry_return_true_data_no_approval()
  test_data_user_can_manage_entry_return_true_record_unapproved()
  test_data_user_can_manage_entry_return_manageapproved()
  create_user_test_data()
  test_mod_data_rating_can_see_item_ratings()
  test_data_refresh_events()


Class: mod_data_lib_testcase  - X-Ref

Unit tests for lib.php

test_data_delete_record()   X-Ref
No description

test_data_comment_created_event()   X-Ref
Test comment_created event.


test_data_comment_deleted_event()   X-Ref
Test comment_deleted event.


test_data_user_can_manage_entry_return_true_with_capability()   X-Ref
Checks that data_user_can_manage_entry will return true if the user
has the mod/data:manageentries capability.


test_data_user_can_manage_entry_return_false_readonly()   X-Ref
Checks that data_user_can_manage_entry will return false if the data
is set to readonly.


test_data_user_can_manage_entry_return_false_no_record()   X-Ref
Checks that data_user_can_manage_entry will return false if the record
can't be found in the database.


test_data_user_can_manage_entry_return_false_not_owned_record()   X-Ref
Checks that data_user_can_manage_entry will return false if the record
isn't owned by the user.


test_data_user_can_manage_entry_return_true_data_no_approval()   X-Ref
Checks that data_user_can_manage_entry will return true if the data
doesn't require approval.


test_data_user_can_manage_entry_return_true_record_unapproved()   X-Ref
Checks that data_user_can_manage_entry will return true if the record
isn't yet approved.


test_data_user_can_manage_entry_return_manageapproved()   X-Ref
Checks that data_user_can_manage_entry will return the 'manageapproved'
value if the record has already been approved.


create_user_test_data()   X-Ref
Helper method to create a set of test data for data_user_can_manage tests

return: array contains user, course, roleid, module, context and record

test_mod_data_rating_can_see_item_ratings()   X-Ref
Tests for mod_data_rating_can_see_item_ratings().


test_data_refresh_events()   X-Ref
Tests for mod_data_refresh_events.




Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1