[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Behat calendar-related steps definitions. 19 * 20 * @package core_calendar 21 * @category test 22 * @copyright 2013 Mark Nelson <[email protected]> 23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 */ 25 26 // NOTE: no MOODLE_INTERNAL used, this file may be required by behat before including /config.php. 27 require_once (__DIR__ . '/../../../lib/behat/behat_base.php'); 28 29 use Behat\Behat\Context\Step\Given as Given; 30 use Behat\Gherkin\Node\TableNode as TableNode; 31 32 /** 33 * Contains functions used by behat to test functionality. 34 * 35 * @package core_calendar 36 * @category test 37 * @copyright 2013 Mark Nelson <[email protected]> 38 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 39 */ 40 class behat_calendar extends behat_base { 41 42 /** 43 * Create event. 44 * 45 * @Given /^I create a calendar event with form data:$/ 46 * @param TableNode $data 47 * @return array the list of actions to perform 48 */ 49 public function i_create_a_calendar_event_with_form_data($data) { 50 // Get the event name. 51 $eventname = $data->getRow(1); 52 $eventname = $eventname[1]; 53 54 return array( 55 new Given('I follow "' . get_string('monththis', 'calendar') . '"'), 56 new Given('I click on "' . get_string('newevent', 'calendar') .'" "button"'), 57 new Given('I set the following fields to these values:', $data), 58 new Given('I press "' . get_string('savechanges') . '"'), 59 new Given('I should see "' . $eventname . '"') 60 ); 61 } 62 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |