MDL-43738 behat: Updating steps definitions and deprecating methods

This commit is contained in:
David Monllao 2014-01-30 14:48:20 +08:00
parent c3f1e9532d
commit a525414125
10 changed files with 254 additions and 118 deletions

View file

@ -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: