1 | <?php |
||
37 | class TextEditorContext extends RawMinkContext implements Context { |
||
38 | private $textEditorPage; |
||
39 | private $featureContext; |
||
40 | private $filesContext; |
||
41 | |||
42 | /** |
||
43 | * @var boolean |
||
44 | */ |
||
45 | private static $appHadToBeEnabled = false; |
||
46 | |||
47 | /** |
||
48 | * TextEditorContext constructor. |
||
49 | * |
||
50 | * @param TextEditorPage $textEditorPage |
||
51 | */ |
||
52 | public function __construct(TextEditorPage $textEditorPage) { |
||
55 | |||
56 | /** |
||
57 | * @When /^I create a text file with the name ((?:'[^']*')|(?:"[^"]*"))( without changing the default file extension|)$/ |
||
58 | * |
||
59 | * @param string $name |
||
60 | * @param string $useDefaultFileExtension |
||
61 | * @return void |
||
62 | */ |
||
63 | public function createATextFileWithTheName( |
||
77 | |||
78 | |||
79 | /** |
||
80 | * @Then near the new text file box a tooltip with the text :toolTipText should be displayed |
||
81 | * @param string $toolTipText |
||
82 | * @return void |
||
83 | */ |
||
84 | public function nearTheNewTextFileBoxATooltipShouldBeDisplayed($toolTipText) { |
||
90 | |||
91 | /** |
||
92 | * @When I input :text in the text area |
||
93 | * @param string $text |
||
94 | * @return void |
||
95 | */ |
||
96 | public function iInputTextInTheTextArea($text) { |
||
102 | |||
103 | /** |
||
104 | * @When I input the following text in the text area: |
||
105 | * @param PyStringNode $multiLineText |
||
106 | * @return void |
||
107 | */ |
||
108 | public function iInputTheFollowingInTheTextArea(PyStringNode $multiLineText) { |
||
114 | |||
115 | /** |
||
116 | * @Then there is/are :number line(s) of text |
||
117 | * @param int $number |
||
118 | * @return void |
||
119 | */ |
||
120 | public function thereAreLinesOfText($number) { |
||
126 | |||
127 | /** |
||
128 | * @Then line :number of the text is :text |
||
129 | * @param int $number |
||
130 | * @param string $text |
||
131 | * @return void |
||
132 | */ |
||
133 | public function lineOfTheTextIs($number, $text) { |
||
141 | /** |
||
142 | * @When I close the text editor |
||
143 | * @return void |
||
144 | */ |
||
145 | public function iCloseTheTextEditor() { |
||
148 | |||
149 | /** |
||
150 | * This will run once at the start of a whole suite |
||
151 | * of features with scenarios. |
||
152 | * |
||
153 | * @param BeforeSuiteScope $scope |
||
154 | * @return void |
||
155 | * @BeforeSuite |
||
156 | */ |
||
157 | public static function beforeTextEditorSuite(BeforeSuiteScope $scope) { |
||
163 | |||
164 | /** |
||
165 | * This will run once at the end of a whole suite |
||
166 | * of features with scenarios. |
||
167 | * |
||
168 | * @param AfterSuiteScope $scope |
||
169 | * @return void |
||
170 | * @AfterSuite |
||
171 | */ |
||
172 | public static function afterTextEditorSuite(AfterSuiteScope $scope) { |
||
177 | |||
178 | /** |
||
179 | * general before scenario for all text editor tests. |
||
180 | * This will run before EVERY scenario. |
||
181 | * It will set the properties for this object. |
||
182 | * |
||
183 | * @param BeforeScenarioScope $scope |
||
184 | * @return void |
||
185 | * @BeforeScenario |
||
186 | */ |
||
187 | public function before(BeforeScenarioScope $scope) { |
||
195 | } |
||
196 |