@@ -690,36 +690,6 @@ public function amOnRoute(string $route, array $params = []): void
690690 $ this ->amOnPage (Url::to ($ params ));
691691 }
692692
693- /**
694- * Opens the page for the given relative URI or route.
695- *
696- * ``` php
697- * <?php
698- * // opens front page
699- * $I->amOnPage('/');
700- * // opens /register page
701- * $I->amOnPage('/register');
702- * ```
703- *
704- * @param string $page the page URI
705- */
706- public function amOnPage (string $ page ): void
707- {
708- parent ::amOnPage ($ page );
709- }
710-
711- /**
712- * To support to use the behavior of urlManager component
713- * for the methods like this: amOnPage(), sendAjaxRequest() and etc.
714- * @param array $parameters
715- * @param array $files
716- * @param array $server
717- */
718- protected function clientRequest (string $ method , string $ uri , array $ parameters = [], array $ files = [], array $ server = [], string $ content = null , bool $ changeHistory = true ): SymfonyCrawler
719- {
720- return parent ::clientRequest ($ method , \Yii::$ app ->urlManager ->createUrl ($ uri ), $ parameters , $ files , $ server , $ content , $ changeHistory );
721- }
722-
723693 /**
724694 * Gets a component from the Yii container. Throws an exception if the
725695 * component is not available
@@ -729,12 +699,10 @@ protected function clientRequest(string $method, string $uri, array $parameters
729699 * $mailer = $I->grabComponent('mailer');
730700 * ```
731701 *
732- * @param $component
733- * @return mixed
734702 * @throws \Codeception\Exception\ModuleException
735703 * @deprecated in your tests you can use \Yii::$app directly.
736704 */
737- public function grabComponent (mixed $ component )
705+ public function grabComponent (string $ component ): null | object
738706 {
739707 try {
740708 return $ this ->getClient ()->getComponent ($ component );
0 commit comments