From 402f93e2cb31c26216188145e785c00e920c3a1b Mon Sep 17 00:00:00 2001 From: yurabakhtin Date: Wed, 9 Oct 2024 08:54:45 +0000 Subject: [PATCH] Autocommit PHP CS Fixer --- Events.php | 2 +- Module.php | 1 - authclient/TwitterAuth.php | 2 +- config.php | 2 +- controllers/AdminController.php | 1 - models/ConfigureForm.php | 10 +- tests/codeception/_bootstrap.php | 5 +- .../codeception/_support/AcceptanceTester.php | 1 + .../_generated/AcceptanceTesterActions.php | 422 ++++++++++++------ tests/codeception/acceptance/AuthCest.php | 3 +- 10 files changed, 294 insertions(+), 155 deletions(-) diff --git a/Events.php b/Events.php index d9b3d75..253065d 100644 --- a/Events.php +++ b/Events.php @@ -22,7 +22,7 @@ public static function onAuthClientCollectionInit($event) $authClientCollection->setClient('twitter', [ 'class' => TwitterAuth::class, 'consumerKey' => ConfigureForm::getInstance()->consumerId, - 'consumerSecret' => ConfigureForm::getInstance()->consumerSecret + 'consumerSecret' => ConfigureForm::getInstance()->consumerSecret, ]); } } diff --git a/Module.php b/Module.php index bb8fec2..a413860 100644 --- a/Module.php +++ b/Module.php @@ -9,7 +9,6 @@ */ class Module extends \humhub\components\Module { - /** * @inheritdoc */ diff --git a/authclient/TwitterAuth.php b/authclient/TwitterAuth.php index 3a4d562..078c097 100644 --- a/authclient/TwitterAuth.php +++ b/authclient/TwitterAuth.php @@ -13,7 +13,7 @@ class TwitterAuth extends Twitter * @inheritdoc */ public $attributeParams = [ - 'include_email' => 'true' + 'include_email' => 'true', ]; /** diff --git a/config.php b/config.php index 5c8b7b1..97c5a34 100644 --- a/config.php +++ b/config.php @@ -7,6 +7,6 @@ 'class' => 'humhubContrib\auth\twitter\Module', 'namespace' => 'humhubContrib\auth\twitter', 'events' => [ - [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\twitter\Events', 'onAuthClientCollectionInit']] + [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\twitter\Events', 'onAuthClientCollectionInit']], ], ]; diff --git a/controllers/AdminController.php b/controllers/AdminController.php index 88823de..03d74c1 100644 --- a/controllers/AdminController.php +++ b/controllers/AdminController.php @@ -11,7 +11,6 @@ */ class AdminController extends Controller { - /** * Render admin only page * diff --git a/models/ConfigureForm.php b/models/ConfigureForm.php index c607fab..6ffbc67 100644 --- a/models/ConfigureForm.php +++ b/models/ConfigureForm.php @@ -13,7 +13,7 @@ class ConfigureForm extends Model { /** - * @var boolean Enable this authclient + * @var bool Enable this authclient */ public $enabled; @@ -74,12 +74,12 @@ public function loadSettings() $settings = $module->settings; - $this->enabled = (boolean)$settings->get('enabled'); + $this->enabled = (bool)$settings->get('enabled'); $this->consumerId = $settings->get('consumerId'); $this->consumerSecret = $settings->get('consumerSecret'); $this->redirectUri = Url::to(['/user/auth/external', 'authclient' => 'twitter'], true); -// $this->redirectUri = Url::to(['user/auth/twitter'], true); + // $this->redirectUri = Url::to(['user/auth/twitter'], true); } /** @@ -90,7 +90,7 @@ public function saveSettings() /** @var Module $module */ $module = Yii::$app->getModule('auth-twitter'); - $module->settings->set('enabled', (boolean)$this->enabled); + $module->settings->set('enabled', (bool)$this->enabled); $module->settings->set('consumerId', $this->consumerId); $module->settings->set('consumerSecret', $this->consumerSecret); @@ -102,7 +102,7 @@ public function saveSettings() */ public static function getInstance() { - $config = new static; + $config = new static(); $config->loadSettings(); return $config; diff --git a/tests/codeception/_bootstrap.php b/tests/codeception/_bootstrap.php index 979f8c4..498fdde 100644 --- a/tests/codeception/_bootstrap.php +++ b/tests/codeception/_bootstrap.php @@ -39,11 +39,10 @@ \Codeception\Util\Autoload::addNamespace('', Yii::getAlias('@humhubTests/codeception/_support')); \Codeception\Util\Autoload::addNamespace('tests\codeception\fixtures', Yii::getAlias('@humhubTests/codeception/fixtures')); \Codeception\Util\Autoload::addNamespace('', Yii::getAlias('@humhubTests/codeception/_pages')); -if(isset($cfg['modules'])) { +if (isset($cfg['modules'])) { \Codeception\Configuration::append(['humhub_modules' => $cfg['modules']]); } -if(isset($cfg['fixtures'])) { +if (isset($cfg['fixtures'])) { \Codeception\Configuration::append(['fixtures' => $cfg['fixtures']]); } -?> diff --git a/tests/codeception/_support/AcceptanceTester.php b/tests/codeception/_support/AcceptanceTester.php index 88b5be2..69818ba 100644 --- a/tests/codeception/_support/AcceptanceTester.php +++ b/tests/codeception/_support/AcceptanceTester.php @@ -1,4 +1,5 @@ getScenario()->runStep(new \Codeception\Step\Action('debugWebDriverLogs', func_get_args())); } @@ -49,7 +53,8 @@ public function debugWebDriverLogs(?\Codeception\TestInterface $test = NULL) { * @return mixed * @see \Codeception\Module\WebDriver::amOnSubdomain() */ - public function amOnSubdomain($subdomain) { + public function amOnSubdomain($subdomain) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args())); } @@ -71,7 +76,8 @@ public function amOnSubdomain($subdomain) { * @param $name * @see \Codeception\Module\WebDriver::makeScreenshot() */ - public function makeScreenshot($name = NULL) { + public function makeScreenshot($name = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('makeScreenshot', func_get_args())); } @@ -93,7 +99,8 @@ public function makeScreenshot($name = NULL) { * @param $name * @see \Codeception\Module\WebDriver::makeElementScreenshot() */ - public function makeElementScreenshot($selector, $name = NULL) { + public function makeElementScreenshot($selector, $name = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('makeElementScreenshot', func_get_args())); } @@ -114,7 +121,8 @@ public function makeElementScreenshot($selector, $name = NULL) { * @param null $name * @see \Codeception\Module\WebDriver::makeHtmlSnapshot() */ - public function makeHtmlSnapshot($name = NULL) { + public function makeHtmlSnapshot($name = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('makeHtmlSnapshot', func_get_args())); } @@ -134,7 +142,8 @@ public function makeHtmlSnapshot($name = NULL) { * @param int $height * @see \Codeception\Module\WebDriver::resizeWindow() */ - public function resizeWindow($width, $height) { + public function resizeWindow($width, $height) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('resizeWindow', func_get_args())); } @@ -156,7 +165,8 @@ public function resizeWindow($width, $height) { * @return mixed * @see \Codeception\Module\WebDriver::seeCookie() */ - public function seeCookie($cookie, array $params = []) { + public function seeCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args())); } /** @@ -177,7 +187,8 @@ public function seeCookie($cookie, array $params = []) { * @return mixed * @see \Codeception\Module\WebDriver::seeCookie() */ - public function canSeeCookie($cookie, array $params = []) { + public function canSeeCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args())); } @@ -194,7 +205,8 @@ public function canSeeCookie($cookie, array $params = []) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeCookie() */ - public function dontSeeCookie($cookie, array $params = []) { + public function dontSeeCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCookie', func_get_args())); } /** @@ -210,7 +222,8 @@ public function dontSeeCookie($cookie, array $params = []) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeCookie() */ - public function cantSeeCookie($cookie, array $params = []) { + public function cantSeeCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args())); } @@ -234,7 +247,8 @@ public function cantSeeCookie($cookie, array $params = []) { * @return mixed * @see \Codeception\Module\WebDriver::setCookie() */ - public function setCookie($cookie, $value, array $params = [], $showDebug = true) { + public function setCookie($cookie, $value, array $params = [], $showDebug = true) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args())); } @@ -251,7 +265,8 @@ public function setCookie($cookie, $value, array $params = [], $showDebug = true * @return mixed * @see \Codeception\Module\WebDriver::resetCookie() */ - public function resetCookie($cookie, array $params = []) { + public function resetCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args())); } @@ -269,7 +284,8 @@ public function resetCookie($cookie, array $params = []) { * @return mixed * @see \Codeception\Module\WebDriver::grabCookie() */ - public function grabCookie($cookie, array $params = []) { + public function grabCookie($cookie, array $params = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args())); } @@ -284,7 +300,8 @@ public function grabCookie($cookie, array $params = []) { * @return string Current page source code. * @see \Codeception\Module\WebDriver::grabPageSource() */ - public function grabPageSource() { + public function grabPageSource() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args())); } @@ -302,7 +319,8 @@ public function grabPageSource() { * ``` * @see \Codeception\Module\WebDriver::amOnUrl() */ - public function amOnUrl($url) { + public function amOnUrl($url) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args())); } @@ -323,7 +341,8 @@ public function amOnUrl($url) { * @param string $page * @see \Codeception\Module\WebDriver::amOnPage() */ - public function amOnPage($page) { + public function amOnPage($page) + { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } @@ -362,7 +381,8 @@ public function amOnPage($page) { * @param array|string $selector optional * @see \Codeception\Module\WebDriver::see() */ - public function see($text, $selector = NULL) { + public function see($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args())); } /** @@ -400,7 +420,8 @@ public function see($text, $selector = NULL) { * @param array|string $selector optional * @see \Codeception\Module\WebDriver::see() */ - public function canSee($text, $selector = NULL) { + public function canSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args())); } @@ -437,7 +458,8 @@ public function canSee($text, $selector = NULL) { * @param array|string $selector optional * @see \Codeception\Module\WebDriver::dontSee() */ - public function dontSee($text, $selector = NULL) { + public function dontSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSee', func_get_args())); } /** @@ -473,7 +495,8 @@ public function dontSee($text, $selector = NULL) { * @param array|string $selector optional * @see \Codeception\Module\WebDriver::dontSee() */ - public function cantSee($text, $selector = NULL) { + public function cantSee($text, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args())); } @@ -492,7 +515,8 @@ public function cantSee($text, $selector = NULL) { * @param $raw * @see \Codeception\Module\WebDriver::seeInSource() */ - public function seeInSource($raw) { + public function seeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args())); } /** @@ -510,7 +534,8 @@ public function seeInSource($raw) { * @param $raw * @see \Codeception\Module\WebDriver::seeInSource() */ - public function canSeeInSource($raw) { + public function canSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args())); } @@ -529,7 +554,8 @@ public function canSeeInSource($raw) { * @param $raw * @see \Codeception\Module\WebDriver::dontSeeInSource() */ - public function dontSeeInSource($raw) { + public function dontSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInSource', func_get_args())); } /** @@ -547,7 +573,8 @@ public function dontSeeInSource($raw) { * @param $raw * @see \Codeception\Module\WebDriver::dontSeeInSource() */ - public function cantSeeInSource($raw) { + public function cantSeeInSource($raw) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args())); } @@ -565,7 +592,8 @@ public function cantSeeInSource($raw) { * @param $text * @see \Codeception\Module\WebDriver::seeInPageSource() */ - public function seeInPageSource($text) { + public function seeInPageSource($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPageSource', func_get_args())); } /** @@ -582,7 +610,8 @@ public function seeInPageSource($text) { * @param $text * @see \Codeception\Module\WebDriver::seeInPageSource() */ - public function canSeeInPageSource($text) { + public function canSeeInPageSource($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPageSource', func_get_args())); } @@ -595,7 +624,8 @@ public function canSeeInPageSource($text) { * @param $text * @see \Codeception\Module\WebDriver::dontSeeInPageSource() */ - public function dontSeeInPageSource($text) { + public function dontSeeInPageSource($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInPageSource', func_get_args())); } /** @@ -607,7 +637,8 @@ public function dontSeeInPageSource($text) { * @param $text * @see \Codeception\Module\WebDriver::dontSeeInPageSource() */ - public function cantSeeInPageSource($text) { + public function cantSeeInPageSource($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInPageSource', func_get_args())); } @@ -646,7 +677,8 @@ public function cantSeeInPageSource($text) { * @param $context * @see \Codeception\Module\WebDriver::click() */ - public function click($link, $context = NULL) { + public function click($link, $context = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); } @@ -668,7 +700,8 @@ public function click($link, $context = NULL) { * @param string $url optional * @see \Codeception\Module\WebDriver::seeLink() */ - public function seeLink($text, $url = NULL) { + public function seeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args())); } /** @@ -689,7 +722,8 @@ public function seeLink($text, $url = NULL) { * @param string $url optional * @see \Codeception\Module\WebDriver::seeLink() */ - public function canSeeLink($text, $url = NULL) { + public function canSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args())); } @@ -711,7 +745,8 @@ public function canSeeLink($text, $url = NULL) { * @param string $url optional * @see \Codeception\Module\WebDriver::dontSeeLink() */ - public function dontSeeLink($text, $url = NULL) { + public function dontSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeLink', func_get_args())); } /** @@ -732,7 +767,8 @@ public function dontSeeLink($text, $url = NULL) { * @param string $url optional * @see \Codeception\Module\WebDriver::dontSeeLink() */ - public function cantSeeLink($text, $url = NULL) { + public function cantSeeLink($text, $url = null) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args())); } @@ -754,7 +790,8 @@ public function cantSeeLink($text, $url = NULL) { * @param string $uri * @see \Codeception\Module\WebDriver::seeInCurrentUrl() */ - public function seeInCurrentUrl($uri) { + public function seeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args())); } /** @@ -775,7 +812,8 @@ public function seeInCurrentUrl($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::seeInCurrentUrl() */ - public function canSeeInCurrentUrl($uri) { + public function canSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args())); } @@ -796,7 +834,8 @@ public function canSeeInCurrentUrl($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals() */ - public function seeCurrentUrlEquals($uri) { + public function seeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args())); } /** @@ -816,7 +855,8 @@ public function seeCurrentUrlEquals($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::seeCurrentUrlEquals() */ - public function canSeeCurrentUrlEquals($uri) { + public function canSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args())); } @@ -836,7 +876,8 @@ public function canSeeCurrentUrlEquals($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches() */ - public function seeCurrentUrlMatches($uri) { + public function seeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args())); } /** @@ -855,7 +896,8 @@ public function seeCurrentUrlMatches($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::seeCurrentUrlMatches() */ - public function canSeeCurrentUrlMatches($uri) { + public function canSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args())); } @@ -874,7 +916,8 @@ public function canSeeCurrentUrlMatches($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl() */ - public function dontSeeInCurrentUrl($uri) { + public function dontSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInCurrentUrl', func_get_args())); } /** @@ -892,7 +935,8 @@ public function dontSeeInCurrentUrl($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeInCurrentUrl() */ - public function cantSeeInCurrentUrl($uri) { + public function cantSeeInCurrentUrl($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args())); } @@ -913,7 +957,8 @@ public function cantSeeInCurrentUrl($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() */ - public function dontSeeCurrentUrlEquals($uri) { + public function dontSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCurrentUrlEquals', func_get_args())); } /** @@ -933,7 +978,8 @@ public function dontSeeCurrentUrlEquals($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlEquals() */ - public function cantSeeCurrentUrlEquals($uri) { + public function cantSeeCurrentUrlEquals($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args())); } @@ -953,7 +999,8 @@ public function cantSeeCurrentUrlEquals($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() */ - public function dontSeeCurrentUrlMatches($uri) { + public function dontSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCurrentUrlMatches', func_get_args())); } /** @@ -972,7 +1019,8 @@ public function dontSeeCurrentUrlMatches($uri) { * @param string $uri * @see \Codeception\Module\WebDriver::dontSeeCurrentUrlMatches() */ - public function cantSeeCurrentUrlMatches($uri) { + public function cantSeeCurrentUrlMatches($uri) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args())); } @@ -995,7 +1043,8 @@ public function cantSeeCurrentUrlMatches($uri) { * @return mixed * @see \Codeception\Module\WebDriver::grabFromCurrentUrl() */ - public function grabFromCurrentUrl($uri = NULL) { + public function grabFromCurrentUrl($uri = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args())); } @@ -1016,7 +1065,8 @@ public function grabFromCurrentUrl($uri = NULL) { * @param $checkbox * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked() */ - public function seeCheckboxIsChecked($checkbox) { + public function seeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args())); } /** @@ -1036,7 +1086,8 @@ public function seeCheckboxIsChecked($checkbox) { * @param $checkbox * @see \Codeception\Module\WebDriver::seeCheckboxIsChecked() */ - public function canSeeCheckboxIsChecked($checkbox) { + public function canSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args())); } @@ -1056,7 +1107,8 @@ public function canSeeCheckboxIsChecked($checkbox) { * @param $checkbox * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() */ - public function dontSeeCheckboxIsChecked($checkbox) { + public function dontSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCheckboxIsChecked', func_get_args())); } /** @@ -1075,7 +1127,8 @@ public function dontSeeCheckboxIsChecked($checkbox) { * @param $checkbox * @see \Codeception\Module\WebDriver::dontSeeCheckboxIsChecked() */ - public function cantSeeCheckboxIsChecked($checkbox) { + public function cantSeeCheckboxIsChecked($checkbox) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args())); } @@ -1101,7 +1154,8 @@ public function cantSeeCheckboxIsChecked($checkbox) { * @param $value * @see \Codeception\Module\WebDriver::seeInField() */ - public function seeInField($field, $value) { + public function seeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args())); } /** @@ -1126,7 +1180,8 @@ public function seeInField($field, $value) { * @param $value * @see \Codeception\Module\WebDriver::seeInField() */ - public function canSeeInField($field, $value) { + public function canSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args())); } @@ -1152,7 +1207,8 @@ public function canSeeInField($field, $value) { * @param $value * @see \Codeception\Module\WebDriver::dontSeeInField() */ - public function dontSeeInField($field, $value) { + public function dontSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInField', func_get_args())); } /** @@ -1177,7 +1233,8 @@ public function dontSeeInField($field, $value) { * @param $value * @see \Codeception\Module\WebDriver::dontSeeInField() */ - public function cantSeeInField($field, $value) { + public function cantSeeInField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args())); } @@ -1246,7 +1303,8 @@ public function cantSeeInField($field, $value) { * @param $params * @see \Codeception\Module\WebDriver::seeInFormFields() */ - public function seeInFormFields($formSelector, array $params) { + public function seeInFormFields($formSelector, array $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args())); } /** @@ -1314,7 +1372,8 @@ public function seeInFormFields($formSelector, array $params) { * @param $params * @see \Codeception\Module\WebDriver::seeInFormFields() */ - public function canSeeInFormFields($formSelector, array $params) { + public function canSeeInFormFields($formSelector, array $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args())); } @@ -1363,7 +1422,8 @@ public function canSeeInFormFields($formSelector, array $params) { * @param $params * @see \Codeception\Module\WebDriver::dontSeeInFormFields() */ - public function dontSeeInFormFields($formSelector, array $params) { + public function dontSeeInFormFields($formSelector, array $params) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInFormFields', func_get_args())); } /** @@ -1411,7 +1471,8 @@ public function dontSeeInFormFields($formSelector, array $params) { * @param $params * @see \Codeception\Module\WebDriver::dontSeeInFormFields() */ - public function cantSeeInFormFields($formSelector, array $params) { + public function cantSeeInFormFields($formSelector, array $params) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args())); } @@ -1450,7 +1511,8 @@ public function cantSeeInFormFields($formSelector, array $params) { * @param $option * @see \Codeception\Module\WebDriver::selectOption() */ - public function selectOption($select, $option) { + public function selectOption($select, $option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args())); } @@ -1464,7 +1526,8 @@ public function selectOption($select, $option) { * @param $option * @see \Codeception\Module\WebDriver::unselectOption() */ - public function unselectOption($select, $option) { + public function unselectOption($select, $option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('unselectOption', func_get_args())); } @@ -1483,7 +1546,8 @@ public function unselectOption($select, $option) { * @param $option * @see \Codeception\Module\WebDriver::checkOption() */ - public function checkOption($option) { + public function checkOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args())); } @@ -1502,7 +1566,8 @@ public function checkOption($option) { * @param $option * @see \Codeception\Module\WebDriver::uncheckOption() */ - public function uncheckOption($option) { + public function uncheckOption($option) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args())); } @@ -1523,7 +1588,8 @@ public function uncheckOption($option) { * @param $value * @see \Codeception\Module\WebDriver::fillField() */ - public function fillField($field, $value) { + public function fillField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args())); } @@ -1541,7 +1607,8 @@ public function fillField($field, $value) { * @param $field * @see \Codeception\Module\WebDriver::clearField() */ - public function clearField($field) { + public function clearField($field) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('clearField', func_get_args())); } @@ -1571,7 +1638,8 @@ public function clearField($field) { * @param $delay [sec] * @see \Codeception\Module\WebDriver::type() */ - public function type($text, $delay = 0) { + public function type($text, $delay = 0) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('type', func_get_args())); } @@ -1592,7 +1660,8 @@ public function type($text, $delay = 0) { * @param $filename * @see \Codeception\Module\WebDriver::attachFile() */ - public function attachFile($field, $filename) { + public function attachFile($field, $filename) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args())); } @@ -1617,7 +1686,8 @@ public function attachFile($field, $filename) { * @return mixed * @see \Codeception\Module\WebDriver::grabTextFrom() */ - public function grabTextFrom($cssOrXPathOrRegex) { + public function grabTextFrom($cssOrXPathOrRegex) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args())); } @@ -1641,7 +1711,8 @@ public function grabTextFrom($cssOrXPathOrRegex) { * @return mixed * @see \Codeception\Module\WebDriver::grabAttributeFrom() */ - public function grabAttributeFrom($cssOrXpath, $attribute) { + public function grabAttributeFrom($cssOrXpath, $attribute) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args())); } @@ -1666,7 +1737,8 @@ public function grabAttributeFrom($cssOrXpath, $attribute) { * @return mixed * @see \Codeception\Module\WebDriver::grabValueFrom() */ - public function grabValueFrom($field) { + public function grabValueFrom($field) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args())); } @@ -1698,7 +1770,8 @@ public function grabValueFrom($field) { * @return string[] * @see \Codeception\Module\WebDriver::grabMultiple() */ - public function grabMultiple($cssOrXpath, $attribute = NULL) { + public function grabMultiple($cssOrXpath, $attribute = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args())); } @@ -1726,7 +1799,8 @@ public function grabMultiple($cssOrXpath, $attribute = NULL) { * @return * @see \Codeception\Module\WebDriver::seeElement() */ - public function seeElement($selector, $attributes = []) { + public function seeElement($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args())); } /** @@ -1753,7 +1827,8 @@ public function seeElement($selector, $attributes = []) { * @return * @see \Codeception\Module\WebDriver::seeElement() */ - public function canSeeElement($selector, $attributes = []) { + public function canSeeElement($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args())); } @@ -1777,7 +1852,8 @@ public function canSeeElement($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::dontSeeElement() */ - public function dontSeeElement($selector, $attributes = []) { + public function dontSeeElement($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeElement', func_get_args())); } /** @@ -1800,7 +1876,8 @@ public function dontSeeElement($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::dontSeeElement() */ - public function cantSeeElement($selector, $attributes = []) { + public function cantSeeElement($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args())); } @@ -1820,7 +1897,8 @@ public function cantSeeElement($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::seeElementInDOM() */ - public function seeElementInDOM($selector, $attributes = []) { + public function seeElementInDOM($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElementInDOM', func_get_args())); } /** @@ -1839,7 +1917,8 @@ public function seeElementInDOM($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::seeElementInDOM() */ - public function canSeeElementInDOM($selector, $attributes = []) { + public function canSeeElementInDOM($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElementInDOM', func_get_args())); } @@ -1853,7 +1932,8 @@ public function canSeeElementInDOM($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::dontSeeElementInDOM() */ - public function dontSeeElementInDOM($selector, $attributes = []) { + public function dontSeeElementInDOM($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeElementInDOM', func_get_args())); } /** @@ -1866,7 +1946,8 @@ public function dontSeeElementInDOM($selector, $attributes = []) { * @param array $attributes * @see \Codeception\Module\WebDriver::dontSeeElementInDOM() */ - public function cantSeeElementInDOM($selector, $attributes = []) { + public function cantSeeElementInDOM($selector, $attributes = []) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElementInDOM', func_get_args())); } @@ -1886,7 +1967,8 @@ public function cantSeeElementInDOM($selector, $attributes = []) { * @param mixed $expected int or int[] * @see \Codeception\Module\WebDriver::seeNumberOfElements() */ - public function seeNumberOfElements($selector, $expected) { + public function seeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args())); } /** @@ -1905,7 +1987,8 @@ public function seeNumberOfElements($selector, $expected) { * @param mixed $expected int or int[] * @see \Codeception\Module\WebDriver::seeNumberOfElements() */ - public function canSeeNumberOfElements($selector, $expected) { + public function canSeeNumberOfElements($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args())); } @@ -1916,7 +1999,8 @@ public function canSeeNumberOfElements($selector, $expected) { * * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() */ - public function seeNumberOfElementsInDOM($selector, $expected) { + public function seeNumberOfElementsInDOM($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElementsInDOM', func_get_args())); } /** @@ -1926,7 +2010,8 @@ public function seeNumberOfElementsInDOM($selector, $expected) { * * @see \Codeception\Module\WebDriver::seeNumberOfElementsInDOM() */ - public function canSeeNumberOfElementsInDOM($selector, $expected) { + public function canSeeNumberOfElementsInDOM($selector, $expected) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElementsInDOM', func_get_args())); } @@ -1948,7 +2033,8 @@ public function canSeeNumberOfElementsInDOM($selector, $expected) { * @return mixed * @see \Codeception\Module\WebDriver::seeOptionIsSelected() */ - public function seeOptionIsSelected($selector, $optionText) { + public function seeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args())); } /** @@ -1969,7 +2055,8 @@ public function seeOptionIsSelected($selector, $optionText) { * @return mixed * @see \Codeception\Module\WebDriver::seeOptionIsSelected() */ - public function canSeeOptionIsSelected($selector, $optionText) { + public function canSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args())); } @@ -1991,7 +2078,8 @@ public function canSeeOptionIsSelected($selector, $optionText) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected() */ - public function dontSeeOptionIsSelected($selector, $optionText) { + public function dontSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeOptionIsSelected', func_get_args())); } /** @@ -2012,7 +2100,8 @@ public function dontSeeOptionIsSelected($selector, $optionText) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeOptionIsSelected() */ - public function cantSeeOptionIsSelected($selector, $optionText) { + public function cantSeeOptionIsSelected($selector, $optionText) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args())); } @@ -2033,7 +2122,8 @@ public function cantSeeOptionIsSelected($selector, $optionText) { * @return mixed * @see \Codeception\Module\WebDriver::seeInTitle() */ - public function seeInTitle($title) { + public function seeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args())); } /** @@ -2053,7 +2143,8 @@ public function seeInTitle($title) { * @return mixed * @see \Codeception\Module\WebDriver::seeInTitle() */ - public function canSeeInTitle($title) { + public function canSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args())); } @@ -2068,7 +2159,8 @@ public function canSeeInTitle($title) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeInTitle() */ - public function dontSeeInTitle($title) { + public function dontSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInTitle', func_get_args())); } /** @@ -2082,7 +2174,8 @@ public function dontSeeInTitle($title) { * @return mixed * @see \Codeception\Module\WebDriver::dontSeeInTitle() */ - public function cantSeeInTitle($title) { + public function cantSeeInTitle($title) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args())); } @@ -2095,7 +2188,8 @@ public function cantSeeInTitle($title) { * as created by [various libraries](http://jster.net/category/windows-modals-popups). * @see \Codeception\Module\WebDriver::acceptPopup() */ - public function acceptPopup() { + public function acceptPopup() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('acceptPopup', func_get_args())); } @@ -2106,7 +2200,8 @@ public function acceptPopup() { * Dismisses the active JavaScript popup, as created by `window.alert`, `window.confirm`, or `window.prompt`. * @see \Codeception\Module\WebDriver::cancelPopup() */ - public function cancelPopup() { + public function cancelPopup() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('cancelPopup', func_get_args())); } @@ -2122,7 +2217,8 @@ public function cancelPopup() { * @throws \Codeception\Exception\ModuleException * @see \Codeception\Module\WebDriver::seeInPopup() */ - public function seeInPopup($text) { + public function seeInPopup($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInPopup', func_get_args())); } /** @@ -2137,7 +2233,8 @@ public function seeInPopup($text) { * @throws \Codeception\Exception\ModuleException * @see \Codeception\Module\WebDriver::seeInPopup() */ - public function canSeeInPopup($text) { + public function canSeeInPopup($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInPopup', func_get_args())); } @@ -2153,7 +2250,8 @@ public function canSeeInPopup($text) { * @throws \Codeception\Exception\ModuleException * @see \Codeception\Module\WebDriver::dontSeeInPopup() */ - public function dontSeeInPopup($text) { + public function dontSeeInPopup($text) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInPopup', func_get_args())); } /** @@ -2168,7 +2266,8 @@ public function dontSeeInPopup($text) { * @throws \Codeception\Exception\ModuleException * @see \Codeception\Module\WebDriver::dontSeeInPopup() */ - public function cantSeeInPopup($text) { + public function cantSeeInPopup($text) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInPopup', func_get_args())); } @@ -2183,7 +2282,8 @@ public function cantSeeInPopup($text) { * @throws \Codeception\Exception\ModuleException * @see \Codeception\Module\WebDriver::typeInPopup() */ - public function typeInPopup($keys) { + public function typeInPopup($keys) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('typeInPopup', func_get_args())); } @@ -2194,7 +2294,8 @@ public function typeInPopup($keys) { * Reloads the current page. * @see \Codeception\Module\WebDriver::reloadPage() */ - public function reloadPage() { + public function reloadPage() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('reloadPage', func_get_args())); } @@ -2205,7 +2306,8 @@ public function reloadPage() { * Moves back in history. * @see \Codeception\Module\WebDriver::moveBack() */ - public function moveBack() { + public function moveBack() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args())); } @@ -2216,7 +2318,8 @@ public function moveBack() { * Moves forward in history. * @see \Codeception\Module\WebDriver::moveForward() */ - public function moveForward() { + public function moveForward() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('moveForward', func_get_args())); } @@ -2383,7 +2486,8 @@ public function moveForward() { * @param $button * @see \Codeception\Module\WebDriver::submitForm() */ - public function submitForm($selector, array $params, $button = NULL) { + public function submitForm($selector, array $params, $button = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args())); } @@ -2410,7 +2514,8 @@ public function submitForm($selector, array $params, $button = NULL) { * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::waitForElementChange() */ - public function waitForElementChange($element, \Closure $callback, $timeout = 30) { + public function waitForElementChange($element, \Closure $callback, $timeout = 30) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementChange', func_get_args())); } @@ -2433,7 +2538,8 @@ public function waitForElementChange($element, \Closure $callback, $timeout = 30 * @throws \Exception * @see \Codeception\Module\WebDriver::waitForElement() */ - public function waitForElement($element, $timeout = 10) { + public function waitForElement($element, $timeout = 10) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElement', func_get_args())); } @@ -2456,7 +2562,8 @@ public function waitForElement($element, $timeout = 10) { * @throws \Exception * @see \Codeception\Module\WebDriver::waitForElementVisible() */ - public function waitForElementVisible($element, $timeout = 10) { + public function waitForElementVisible($element, $timeout = 10) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementVisible', func_get_args())); } @@ -2478,7 +2585,8 @@ public function waitForElementVisible($element, $timeout = 10) { * @throws \Exception * @see \Codeception\Module\WebDriver::waitForElementNotVisible() */ - public function waitForElementNotVisible($element, $timeout = 10) { + public function waitForElementNotVisible($element, $timeout = 10) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementNotVisible', func_get_args())); } @@ -2501,7 +2609,8 @@ public function waitForElementNotVisible($element, $timeout = 10) { * @throws \Exception * @see \Codeception\Module\WebDriver::waitForElementClickable() */ - public function waitForElementClickable($element, $timeout = 10) { + public function waitForElementClickable($element, $timeout = 10) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForElementClickable', func_get_args())); } @@ -2528,7 +2637,8 @@ public function waitForElementClickable($element, $timeout = 10) { * @throws \Exception * @see \Codeception\Module\WebDriver::waitForText() */ - public function waitForText($text, $timeout = 10, $selector = NULL) { + public function waitForText($text, $timeout = 10, $selector = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForText', func_get_args())); } @@ -2542,7 +2652,8 @@ public function waitForText($text, $timeout = 10, $selector = NULL) { * @throws \Codeception\Exception\TestRuntimeException * @see \Codeception\Module\WebDriver::wait() */ - public function wait($timeout) { + public function wait($timeout) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('wait', func_get_args())); } @@ -2567,7 +2678,8 @@ public function wait($timeout) { * @param callable $function * @see \Codeception\Module\WebDriver::executeInSelenium() */ - public function executeInSelenium(\Closure $function) { + public function executeInSelenium(\Closure $function) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('executeInSelenium', func_get_args())); } @@ -2611,7 +2723,8 @@ public function executeInSelenium(\Closure $function) { * @param string|null $name * @see \Codeception\Module\WebDriver::switchToWindow() */ - public function switchToWindow($name = NULL) { + public function switchToWindow($name = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToWindow', func_get_args())); } @@ -2641,7 +2754,8 @@ public function switchToWindow($name = NULL) { * @param string|null $locator (name, CSS or XPath) * @see \Codeception\Module\WebDriver::switchToIFrame() */ - public function switchToIFrame($locator = NULL) { + public function switchToIFrame($locator = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIFrame', func_get_args())); } @@ -2671,7 +2785,8 @@ public function switchToIFrame($locator = NULL) { * @param string|null $locator (name, CSS or XPath) * @see \Codeception\Module\WebDriver::switchToFrame() */ - public function switchToFrame($locator = NULL) { + public function switchToFrame($locator = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToFrame', func_get_args())); } @@ -2693,7 +2808,8 @@ public function switchToFrame($locator = NULL) { * @param int $timeout seconds * @see \Codeception\Module\WebDriver::waitForJS() */ - public function waitForJS($script, $timeout = 5) { + public function waitForJS($script, $timeout = 5) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('waitForJS', func_get_args())); } @@ -2719,7 +2835,8 @@ public function waitForJS($script, $timeout = 5) { * @return mixed * @see \Codeception\Module\WebDriver::executeJS() */ - public function executeJS($script, array $arguments = []) { + public function executeJS($script, array $arguments = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('executeJS', func_get_args())); } @@ -2745,7 +2862,8 @@ public function executeJS($script, array $arguments = []) { * @return mixed * @see \Codeception\Module\WebDriver::executeAsyncJS() */ - public function executeAsyncJS($script, array $arguments = []) { + public function executeAsyncJS($script, array $arguments = []) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('executeAsyncJS', func_get_args())); } @@ -2756,7 +2874,8 @@ public function executeAsyncJS($script, array $arguments = []) { * Maximizes the current window. * @see \Codeception\Module\WebDriver::maximizeWindow() */ - public function maximizeWindow() { + public function maximizeWindow() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('maximizeWindow', func_get_args())); } @@ -2776,7 +2895,8 @@ public function maximizeWindow() { * @param string $target (CSS ID or XPath) * @see \Codeception\Module\WebDriver::dragAndDrop() */ - public function dragAndDrop($source, $target) { + public function dragAndDrop($source, $target) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('dragAndDrop', func_get_args())); } @@ -2805,7 +2925,8 @@ public function dragAndDrop($source, $target) { * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::moveMouseOver() */ - public function moveMouseOver($cssOrXPath = NULL, $offsetX = NULL, $offsetY = NULL) { + public function moveMouseOver($cssOrXPath = null, $offsetX = null, $offsetY = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('moveMouseOver', func_get_args())); } @@ -2834,7 +2955,8 @@ public function moveMouseOver($cssOrXPath = NULL, $offsetX = NULL, $offsetY = NU * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::clickWithLeftButton() */ - public function clickWithLeftButton($cssOrXPath = NULL, $offsetX = NULL, $offsetY = NULL) { + public function clickWithLeftButton($cssOrXPath = null, $offsetX = null, $offsetY = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('clickWithLeftButton', func_get_args())); } @@ -2863,7 +2985,8 @@ public function clickWithLeftButton($cssOrXPath = NULL, $offsetX = NULL, $offset * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::clickWithRightButton() */ - public function clickWithRightButton($cssOrXPath = NULL, $offsetX = NULL, $offsetY = NULL) { + public function clickWithRightButton($cssOrXPath = null, $offsetX = null, $offsetY = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('clickWithRightButton', func_get_args())); } @@ -2877,7 +3000,8 @@ public function clickWithRightButton($cssOrXPath = NULL, $offsetX = NULL, $offse * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::doubleClick() */ - public function doubleClick($cssOrXPath) { + public function doubleClick($cssOrXPath) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('doubleClick', func_get_args())); } @@ -2906,7 +3030,8 @@ public function doubleClick($cssOrXPath) { * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::pressKey() */ - public function pressKey($element, $char) { + public function pressKey($element, $char) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('pressKey', func_get_args())); } @@ -2929,7 +3054,8 @@ public function pressKey($element, $char) { * @throws \Codeception\Exception\ElementNotFound * @see \Codeception\Module\WebDriver::appendField() */ - public function appendField($field, $value) { + public function appendField($field, $value) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('appendField', func_get_args())); } @@ -2967,7 +3093,8 @@ public function appendField($field, $value) { * @return mixed * @see \Codeception\Module\WebDriver::saveSessionSnapshot() */ - public function saveSessionSnapshot($name) { + public function saveSessionSnapshot($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('saveSessionSnapshot', func_get_args())); } @@ -2984,7 +3111,8 @@ public function saveSessionSnapshot($name) { * @return mixed * @see \Codeception\Module\WebDriver::loadSessionSnapshot() */ - public function loadSessionSnapshot($name) { + public function loadSessionSnapshot($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('loadSessionSnapshot', func_get_args())); } @@ -3000,7 +3128,8 @@ public function loadSessionSnapshot($name) { * @return mixed * @see \Codeception\Module\WebDriver::deleteSessionSnapshot() */ - public function deleteSessionSnapshot($name) { + public function deleteSessionSnapshot($name) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteSessionSnapshot', func_get_args())); } @@ -3023,7 +3152,8 @@ public function deleteSessionSnapshot($name) { * @param int $offsetY * @see \Codeception\Module\WebDriver::scrollTo() */ - public function scrollTo($selector, $offsetX = NULL, $offsetY = NULL) { + public function scrollTo($selector, $offsetX = null, $offsetY = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('scrollTo', func_get_args())); } @@ -3042,7 +3172,8 @@ public function scrollTo($selector, $offsetX = NULL, $offsetY = NULL) { * * The sessionStorage is copied to the new tab (contrary to a tab that was manually opened by the user) * @see \Codeception\Module\WebDriver::openNewTab() */ - public function openNewTab() { + public function openNewTab() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('openNewTab', func_get_args())); } @@ -3059,7 +3190,8 @@ public function openNewTab() { * @param $number number of tabs * @see \Codeception\Module\WebDriver::seeNumberOfTabs() */ - public function seeNumberOfTabs($number) { + public function seeNumberOfTabs($number) + { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfTabs', func_get_args())); } /** @@ -3075,7 +3207,8 @@ public function seeNumberOfTabs($number) { * @param $number number of tabs * @see \Codeception\Module\WebDriver::seeNumberOfTabs() */ - public function canSeeNumberOfTabs($number) { + public function canSeeNumberOfTabs($number) + { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfTabs', func_get_args())); } @@ -3091,7 +3224,8 @@ public function canSeeNumberOfTabs($number) { * ``` * @see \Codeception\Module\WebDriver::closeTab() */ - public function closeTab() { + public function closeTab() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('closeTab', func_get_args())); } @@ -3112,7 +3246,8 @@ public function closeTab() { * @param int $offset 1 * @see \Codeception\Module\WebDriver::switchToNextTab() */ - public function switchToNextTab($offset = 1) { + public function switchToNextTab($offset = 1) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToNextTab', func_get_args())); } @@ -3133,7 +3268,8 @@ public function switchToNextTab($offset = 1) { * @param int $offset 1 * @see \Codeception\Module\WebDriver::switchToPreviousTab() */ - public function switchToPreviousTab($offset = 1) { + public function switchToPreviousTab($offset = 1) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToPreviousTab', func_get_args())); } @@ -3184,7 +3320,8 @@ public function switchToPreviousTab($offset = 1) { * @param int $timeout * @see \Codeception\Module\WebDriver::performOn() */ - public function performOn($element, $actions, $timeout = 10) { + public function performOn($element, $actions, $timeout = 10) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('performOn', func_get_args())); } @@ -3195,7 +3332,8 @@ public function performOn($element, $actions, $timeout = 10) { * @inheritdoc * @see \tests\codeception\_support\DynamicFixtureHelper::globalFixtures() */ - public function globalFixtures() { + public function globalFixtures() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('globalFixtures', func_get_args())); } @@ -3206,7 +3344,8 @@ public function globalFixtures() { * @inheritdoc * @see \tests\codeception\_support\DynamicFixtureHelper::fixtures() */ - public function fixtures() { + public function fixtures() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('fixtures', func_get_args())); } @@ -3220,7 +3359,8 @@ public function fixtures() { * the return value of [[getFixtures()]] will be used. * @see \tests\codeception\_support\DynamicFixtureHelper::loadFixtures() */ - public function loadFixtures($fixtures = NULL) { + public function loadFixtures($fixtures = null) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('loadFixtures', func_get_args())); } @@ -3232,7 +3372,8 @@ public function loadFixtures($fixtures = NULL) { * @since 2.0.12 * @see \tests\codeception\_support\DynamicFixtureHelper::initFixtures() */ - public function initFixtures() { + public function initFixtures() + { return $this->getScenario()->runStep(new \Codeception\Step\Action('initFixtures', func_get_args())); } @@ -3248,7 +3389,8 @@ public function initFixtures() { * @throws InvalidConfigException if fixtures are not properly configured * @see \tests\codeception\_support\DynamicFixtureHelper::createFixtures() */ - public function createFixtures(array $fixtures) { + public function createFixtures(array $fixtures) + { return $this->getScenario()->runStep(new \Codeception\Step\Action('createFixtures', func_get_args())); } } diff --git a/tests/codeception/acceptance/AuthCest.php b/tests/codeception/acceptance/AuthCest.php index 34c3ce1..411232c 100644 --- a/tests/codeception/acceptance/AuthCest.php +++ b/tests/codeception/acceptance/AuthCest.php @@ -2,11 +2,10 @@ namespace twitter\acceptance; -use \AcceptanceTester; +use AcceptanceTester; class AuthCest { - public function testTwitterSignUpAndLogin(AcceptanceTester $I) { $I->wantTo('sign up with twitter');