mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 10:56:56 +02:00
MDL-43738 behat: Updating steps definitions and deprecating methods
This commit is contained in:
parent
c3f1e9532d
commit
a525414125
10 changed files with 254 additions and 118 deletions
|
@ -50,10 +50,6 @@ use Behat\Behat\Exception\PendingException as PendingException;
|
|||
*/
|
||||
class behat_data_generators extends behat_base {
|
||||
|
||||
const cap_allow = 'Allow';
|
||||
const cap_prevent = 'Prevent';
|
||||
const cap_prohibit = 'Prohibit';
|
||||
|
||||
/**
|
||||
* @var testing_data_generator
|
||||
*/
|
||||
|
@ -303,13 +299,13 @@ class behat_data_generators extends behat_base {
|
|||
$context = $this->get_context($data['contextlevel'], $data['reference']);
|
||||
|
||||
switch ($data['permission']) {
|
||||
case self::cap_allow:
|
||||
case get_string('allow', 'role'):
|
||||
$permission = CAP_ALLOW;
|
||||
break;
|
||||
case self::cap_prevent:
|
||||
case get_string('prevent', 'role'):
|
||||
$permission = CAP_PREVENT;
|
||||
break;
|
||||
case self::cap_prohibit:
|
||||
case get_string('prohibit', 'role'):
|
||||
$permission = CAP_PROHIBIT;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue