Moodle

Array[Not]HasKey/Value

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.9.4
  • Fix Version/s: None
  • Component/s: Unit tests
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE

Description

Although it might be less common to use arrays in addition to objects, but
they are still very popwerful. Anyway, it would be fine to have the
following methods for testing arrays: ArrayHasKey, ArrayNotHasKey,
ArrayHasValue, and ArrayNotHasValue.

As suggested by Tim Hunt, I added the attached code to the simpletestlib.php:

Thanks,
Marcel

Activity

Hide
Tim Hunt added a comment -

Forum thread is http://moodle.org/mod/forum/discuss.php?d=122823

Nico, may as well leave this assigned to you for now. However, if you don't want to deal with this, assign it to me and I'll do it when I get back from holiday.

Show
Tim Hunt added a comment - Forum thread is http://moodle.org/mod/forum/discuss.php?d=122823 Nico, may as well leave this assigned to you for now. However, if you don't want to deal with this, assign it to me and I'll do it when I get back from holiday.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: