| 
									
										
										
										
											2014-12-24 22:39:23 +01:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-12-30 15:17:01 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Class PreferencesControllerCest | 
					
						
							| 
									
										
										
										
											2014-12-30 17:55:46 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * @SuppressWarnings("CamelCase") | 
					
						
							|  |  |  |  * @SuppressWarnings("short") | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2014-12-30 15:17:01 +01:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2014-12-24 22:39:23 +01:00
										 |  |  | class PreferencesControllerCest | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param FunctionalTester $I | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function _after(FunctionalTester $I) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param FunctionalTester $I | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function _before(FunctionalTester $I) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param FunctionalTester $I | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function index(FunctionalTester $I) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $I->wantTo('see my current set of preferences'); | 
					
						
							|  |  |  |         $I->amOnPage('/preferences'); | 
					
						
							|  |  |  |         $I->see('Preferences'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param FunctionalTester $I | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function postIndex(FunctionalTester $I) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $I->wantTo('want to update my preferences'); | 
					
						
							|  |  |  |         $I->amOnPage('/preferences'); | 
					
						
							|  |  |  |         $I->see('Preferences'); | 
					
						
							|  |  |  |         $I->submitForm('#preferences', []); | 
					
						
							|  |  |  |         $I->see('Preferences saved!'); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |