|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114 |
- <?php //[STAMP] f27cd14eb2621d7d7c79eb236a027ea5
- namespace tests\codeception\backend\_generated;
-
- // This class was automatically generated by build task
- // You should not change it manually as it will be overwritten on next build
- // @codingStandardsIgnoreFile
-
- trait FunctionalTesterActions
- {
- /**
- * @return \Codeception\Scenario
- */
- abstract protected function getScenario();
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Enters a directory In local filesystem.
- * Project root directory is used by default
- *
- * @param string $path
- * @see \Codeception\Module\Filesystem::amInPath()
- */
- public function amInPath($path) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opens a file and stores it's content.
- *
- * Usage:
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->seeInThisFile('codeception/codeception');
- * ?>
- * ```
- *
- * @param string $filename
- * @see \Codeception\Module\Filesystem::openFile()
- */
- public function openFile($filename) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('openFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Deletes a file
- *
- * ``` php
- * <?php
- * $I->deleteFile('composer.lock');
- * ?>
- * ```
- *
- * @param string $filename
- * @see \Codeception\Module\Filesystem::deleteFile()
- */
- public function deleteFile($filename) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Deletes directory with all subdirectories
- *
- * ``` php
- * <?php
- * $I->deleteDir('vendor');
- * ?>
- * ```
- *
- * @param string $dirname
- * @see \Codeception\Module\Filesystem::deleteDir()
- */
- public function deleteDir($dirname) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Copies directory with all contents
- *
- * ``` php
- * <?php
- * $I->copyDir('vendor','old_vendor');
- * ?>
- * ```
- *
- * @param string $src
- * @param string $dst
- * @see \Codeception\Module\Filesystem::copyDir()
- */
- public function copyDir($src, $dst) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file has `text` in it.
- *
- * Usage:
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->seeInThisFile('codeception/codeception');
- * ?>
- * ```
- *
- * @param string $text
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::seeInThisFile()
- */
- public function canSeeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file has `text` in it.
- *
- * Usage:
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->seeInThisFile('codeception/codeception');
- * ?>
- * ```
- *
- * @param string $text
- * @see \Codeception\Module\Filesystem::seeInThisFile()
- */
- public function seeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file has the `number` of new lines.
- *
- * Usage:
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->seeNumberNewLines(5);
- * ?>
- * ```
- *
- * @param int $number New lines
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::seeNumberNewLines()
- */
- public function canSeeNumberNewLines($number) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file has the `number` of new lines.
- *
- * Usage:
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->seeNumberNewLines(5);
- * ?>
- * ```
- *
- * @param int $number New lines
- * @see \Codeception\Module\Filesystem::seeNumberNewLines()
- */
- public function seeNumberNewLines($number) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberNewLines', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that contents of currently opened file matches $regex
- *
- * @param string $regex
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::seeThisFileMatches()
- */
- public function canSeeThisFileMatches($regex) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeThisFileMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that contents of currently opened file matches $regex
- *
- * @param string $regex
- * @see \Codeception\Module\Filesystem::seeThisFileMatches()
- */
- public function seeThisFileMatches($regex) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeThisFileMatches', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks the strict matching of file contents.
- * Unlike `seeInThisFile` will fail if file has something more than expected lines.
- * Better to use with HEREDOC strings.
- * Matching is done after removing "\r" chars from file content.
- *
- * ``` php
- * <?php
- * $I->openFile('process.pid');
- * $I->seeFileContentsEqual('3192');
- * ?>
- * ```
- *
- * @param string $text
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::seeFileContentsEqual()
- */
- public function canSeeFileContentsEqual($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks the strict matching of file contents.
- * Unlike `seeInThisFile` will fail if file has something more than expected lines.
- * Better to use with HEREDOC strings.
- * Matching is done after removing "\r" chars from file content.
- *
- * ``` php
- * <?php
- * $I->openFile('process.pid');
- * $I->seeFileContentsEqual('3192');
- * ?>
- * ```
- *
- * @param string $text
- * @see \Codeception\Module\Filesystem::seeFileContentsEqual()
- */
- public function seeFileContentsEqual($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file doesn't contain `text` in it
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->dontSeeInThisFile('codeception/codeception');
- * ?>
- * ```
- *
- * @param string $text
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
- */
- public function cantSeeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks If opened file doesn't contain `text` in it
- *
- * ``` php
- * <?php
- * $I->openFile('composer.json');
- * $I->dontSeeInThisFile('codeception/codeception');
- * ?>
- * ```
- *
- * @param string $text
- * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
- */
- public function dontSeeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Deletes a file
- * @see \Codeception\Module\Filesystem::deleteThisFile()
- */
- public function deleteThisFile() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if file exists in path.
- * Opens a file when it's exists
- *
- * ``` php
- * <?php
- * $I->seeFileFound('UserModel.php','app/models');
- * ?>
- * ```
- *
- * @param string $filename
- * @param string $path
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::seeFileFound()
- */
- public function canSeeFileFound($filename, $path = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if file exists in path.
- * Opens a file when it's exists
- *
- * ``` php
- * <?php
- * $I->seeFileFound('UserModel.php','app/models');
- * ?>
- * ```
- *
- * @param string $filename
- * @param string $path
- * @see \Codeception\Module\Filesystem::seeFileFound()
- */
- public function seeFileFound($filename, $path = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if file does not exist in path
- *
- * @param string $filename
- * @param string $path
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Filesystem::dontSeeFileFound()
- */
- public function cantSeeFileFound($filename, $path = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if file does not exist in path
- *
- * @param string $filename
- * @param string $path
- * @see \Codeception\Module\Filesystem::dontSeeFileFound()
- */
- public function dontSeeFileFound($filename, $path = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Erases directory contents
- *
- * ``` php
- * <?php
- * $I->cleanDir('logs');
- * ?>
- * ```
- *
- * @param string $dirname
- * @see \Codeception\Module\Filesystem::cleanDir()
- */
- public function cleanDir($dirname) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Saves contents to file
- *
- * @param string $filename
- * @param string $contents
- * @see \Codeception\Module\Filesystem::writeToFile()
- */
- public function writeToFile($filename, $contents) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Authorizes user on a site without submitting login form.
- * Use it for fast pragmatic authorization in functional tests.
- *
- * ```php
- * <?php
- * // User is found by id
- * $I->amLoggedInAs(1);
- *
- * // User object is passed as parameter
- * $admin = \app\models\User::findByUsername('admin');
- * $I->amLoggedInAs($admin);
- * ```
- * Requires `user` component to be enabled and configured.
- *
- * @param $user
- * @throws ModuleException
- * @see \Codeception\Module\Yii2::amLoggedInAs()
- */
- public function amLoggedInAs($user) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amLoggedInAs', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Creates and loads fixtures from a config.
- * Signature is the same as for `fixtures()` method of `yii\test\FixtureTrait`
- *
- * ```php
- * <?php
- * $I->haveFixtures([
- * 'posts' => PostsFixture::className(),
- * 'user' => [
- * 'class' => UserFixture::className(),
- * 'dataFile' => '@tests/_data/models/user.php',
- * ],
- * ]);
- * ```
- *
- * Note: if you need to load fixtures before the test (probably before the cleanup transaction is started;
- * `cleanup` options is `true` by default), you can specify fixtures with _fixtures method of a testcase
- * ```php
- * <?php
- * // inside Cest file or Codeception\TestCase\Unit
- * public function _fixtures(){
- * return [
- * 'user' => [
- * 'class' => UserFixture::className(),
- * 'dataFile' => codecept_data_dir() . 'user.php'
- * ]
- * ];
- * }
- * ```
- * instead of defining `haveFixtures` in Cest `_before`
- *
- * @param $fixtures
- * @part fixtures
- * @see \Codeception\Module\Yii2::haveFixtures()
- */
- public function haveFixtures($fixtures) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('haveFixtures', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Returns all loaded fixtures.
- * Array of fixture instances
- *
- * @part fixtures
- * @return array
- * @see \Codeception\Module\Yii2::grabFixtures()
- */
- public function grabFixtures() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixtures', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Gets a fixture by name.
- * Returns a Fixture instance. If a fixture is an instance of `\yii\test\BaseActiveFixture` a second parameter
- * can be used to return a specific model:
- *
- * ```php
- * <?php
- * $I->haveFixtures(['users' => UserFixture::className()]);
- *
- * $users = $I->grabFixture('users');
- *
- * // get first user by key, if a fixture is instance of ActiveFixture
- * $user = $I->grabFixture('users', 'user1');
- * ```
- *
- * @param $name
- * @return mixed
- * @throws ModuleException if a fixture is not found
- * @part fixtures
- * @see \Codeception\Module\Yii2::grabFixture()
- */
- public function grabFixture($name, $index = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFixture', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Inserts record into the database.
- *
- * ``` php
- * <?php
- * $user_id = $I->haveRecord('app\models\User', array('name' => 'Davert'));
- * ?>
- * ```
- *
- * @param $model
- * @param array $attributes
- * @return mixed
- * @part orm
- * @see \Codeception\Module\Yii2::haveRecord()
- */
- public function haveRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that record exists in database.
- *
- * ``` php
- * $I->seeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Yii2::seeRecord()
- */
- public function canSeeRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that record exists in database.
- *
- * ``` php
- * $I->seeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * @see \Codeception\Module\Yii2::seeRecord()
- */
- public function seeRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that record does not exist in database.
- *
- * ``` php
- * $I->dontSeeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Yii2::dontSeeRecord()
- */
- public function cantSeeRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that record does not exist in database.
- *
- * ``` php
- * $I->dontSeeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * @see \Codeception\Module\Yii2::dontSeeRecord()
- */
- public function dontSeeRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeRecord', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Retrieves record from database
- *
- * ``` php
- * $category = $I->grabRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @return mixed
- * @part orm
- * @see \Codeception\Module\Yii2::grabRecord()
- */
- public function grabRecord($model, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Similar to amOnPage but accepts route as first argument and params as second
- *
- * ```
- * $I->amOnRoute('site/view', ['page' => 'about']);
- * ```
- *
- * @see \Codeception\Module\Yii2::amOnRoute()
- */
- public function amOnRoute($route, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Gets a component from Yii container. Throws exception if component is not available
- *
- * ```php
- * <?php
- * $mailer = $I->grabComponent('mailer');
- * ```
- *
- * @param $component
- * @return mixed
- * @throws ModuleException
- * @deprecated in your tests you can use \Yii::$app directly.
- * @see \Codeception\Module\Yii2::grabComponent()
- */
- public function grabComponent($component) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabComponent', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that email is sent.
- *
- * ```php
- * <?php
- * // check that at least 1 email was sent
- * $I->seeEmailIsSent();
- *
- * // check that only 3 emails were sent
- * $I->seeEmailIsSent(3);
- * ```
- *
- * @param int $num
- * @throws ModuleException
- * @part email
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Yii2::seeEmailIsSent()
- */
- public function canSeeEmailIsSent($num = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEmailIsSent', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that email is sent.
- *
- * ```php
- * <?php
- * // check that at least 1 email was sent
- * $I->seeEmailIsSent();
- *
- * // check that only 3 emails were sent
- * $I->seeEmailIsSent(3);
- * ```
- *
- * @param int $num
- * @throws ModuleException
- * @part email
- * @see \Codeception\Module\Yii2::seeEmailIsSent()
- */
- public function seeEmailIsSent($num = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEmailIsSent', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that no email was sent
- *
- * @part email
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Yii2::dontSeeEmailIsSent()
- */
- public function cantSeeEmailIsSent() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeEmailIsSent', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that no email was sent
- *
- * @part email
- * @see \Codeception\Module\Yii2::dontSeeEmailIsSent()
- */
- public function dontSeeEmailIsSent() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeEmailIsSent', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Returns array of all sent email messages.
- * Each message implements `yii\mail\MessageInterface` interface.
- * Useful to perform additional checks using `Asserts` module:
- *
- * ```php
- * <?php
- * $I->seeEmailIsSent();
- * $messages = $I->grabSentEmails();
- * $I->assertEquals('admin@site,com', $messages[0]->getTo());
- * ```
- *
- * @part email
- * @return array
- * @throws ModuleException
- * @see \Codeception\Module\Yii2::grabSentEmails()
- */
- public function grabSentEmails() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabSentEmails', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Returns last sent email:
- *
- * ```php
- * <?php
- * $I->seeEmailIsSent();
- * $message = $I->grabLastSentEmail();
- * $I->assertEquals('admin@site,com', $message->getTo());
- * ```
- * @part email
- * @see \Codeception\Module\Yii2::grabLastSentEmail()
- */
- public function grabLastSentEmail() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastSentEmail', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Returns a list of regex patterns for recognized domain names
- *
- * @return array
- * @see \Codeception\Module\Yii2::getInternalDomains()
- */
- public function getInternalDomains() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('getInternalDomains', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets a cookie and, if validation is enabled, signs it.
- * @param string $name The name of the cookie
- * @param string $value The value of the cookie
- * @param array $params Additional cookie params like `domain`, `path`, `expires` and `secure`.
- * @see \Codeception\Module\Yii2::setCookie()
- */
- public function setCookie($name, $val, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * This function creates the CSRF Cookie.
- * @param string $val The value of the CSRF token
- * @return string[] Returns an array containing the name of the CSRF param and the masked CSRF token.
- * @see \Codeception\Module\Yii2::createAndSetCsrfCookie()
- */
- public function createAndSetCsrfCookie($val) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('createAndSetCsrfCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Authenticates user for HTTP_AUTH
- *
- * @param $username
- * @param $password
- * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated()
- */
- public function amHttpAuthenticated($username, $password) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets the HTTP header to the passed value - which is used on
- * subsequent HTTP requests through PhpBrowser.
- *
- * Example:
- * ```php
- * <?php
- * $I->haveHttpHeader('X-Requested-With', 'Codeception');
- * $I->amOnPage('test-headers.php');
- * ?>
- * ```
- *
- * To use special chars in Header Key use HTML Character Entities:
- * Example:
- * Header with underscore - 'Client_Id'
- * should be represented as - 'Client_Id' or 'Client_Id'
- *
- * ```php
- * <?php
- * $I->haveHttpHeader('Client_Id', 'Codeception');
- * ?>
- * ```
- *
- * @param string $name the name of the request header
- * @param string $value the value to set it to for subsequent
- * requests
- * @see \Codeception\Lib\InnerBrowser::haveHttpHeader()
- */
- public function haveHttpHeader($name, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('haveHttpHeader', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Deletes the header with the passed name. Subsequent requests
- * will not have the deleted header in its request.
- *
- * Example:
- * ```php
- * <?php
- * $I->haveHttpHeader('X-Requested-With', 'Codeception');
- * $I->amOnPage('test-headers.php');
- * // ...
- * $I->deleteHeader('X-Requested-With');
- * $I->amOnPage('some-other-page.php');
- * ?>
- * ```
- *
- * @param string $name the name of the header to delete.
- * @see \Codeception\Lib\InnerBrowser::deleteHeader()
- */
- public function deleteHeader($name) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('deleteHeader', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opens the page for the given relative URI.
- *
- * ``` php
- * <?php
- * // opens front page
- * $I->amOnPage('/');
- * // opens /register page
- * $I->amOnPage('/register');
- * ```
- *
- * @param string $page
- * @see \Codeception\Lib\InnerBrowser::amOnPage()
- */
- public function amOnPage($page) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Perform a click on a link or a button, given by a locator.
- * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string.
- * For buttons, the "value" attribute, "name" attribute, and inner text are searched.
- * For links, the link text is searched.
- * For images, the "alt" attribute and inner text of any parent links are searched.
- *
- * The second parameter is a context (CSS or XPath locator) to narrow the search.
- *
- * Note that if the locator matches a button of type `submit`, the form will be submitted.
- *
- * ``` php
- * <?php
- * // simple link
- * $I->click('Logout');
- * // button of form
- * $I->click('Submit');
- * // CSS button
- * $I->click('#form input[type=submit]');
- * // XPath
- * $I->click('//form/*[@type="submit"]');
- * // link in context
- * $I->click('Logout', '#nav');
- * // using strict locator
- * $I->click(['link' => 'Login']);
- * ?>
- * ```
- *
- * @param $link
- * @param $context
- * @see \Codeception\Lib\InnerBrowser::click()
- */
- public function click($link, $context = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string (case insensitive).
- *
- * You can specify a specific HTML element (via CSS or XPath) as the second
- * parameter to only search within that element.
- *
- * ``` php
- * <?php
- * $I->see('Logout'); // I can suppose user is logged in
- * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
- * $I->see('Sign Up', '//body/h1'); // with XPath
- * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->see('strong')` will return true for strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will *not* be true for strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param array|string $selector optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::see()
- */
- public function canSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string (case insensitive).
- *
- * You can specify a specific HTML element (via CSS or XPath) as the second
- * parameter to only search within that element.
- *
- * ``` php
- * <?php
- * $I->see('Logout'); // I can suppose user is logged in
- * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
- * $I->see('Sign Up', '//body/h1'); // with XPath
- * $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->see('strong')` will return true for strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will *not* be true for strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param array|string $selector optional
- * @see \Codeception\Lib\InnerBrowser::see()
- */
- public function see($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('see', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page doesn't contain the text specified (case insensitive).
- * Give a locator as the second parameter to match a specific region.
- *
- * ```php
- * <?php
- * $I->dontSee('Login'); // I can suppose user is already logged in
- * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
- * $I->dontSee('Sign Up','//body/h1'); // with XPath
- * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->dontSee('strong')` will fail on strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will ignore strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param array|string $selector optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSee()
- */
- public function cantSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page doesn't contain the text specified (case insensitive).
- * Give a locator as the second parameter to match a specific region.
- *
- * ```php
- * <?php
- * $I->dontSee('Login'); // I can suppose user is already logged in
- * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
- * $I->dontSee('Sign Up','//body/h1'); // with XPath
- * $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
- * ```
- *
- * Note that the search is done after stripping all HTML tags from the body,
- * so `$I->dontSee('strong')` will fail on strings like:
- *
- * - `<p>I am Stronger than thou</p>`
- * - `<script>document.createElement('strong');</script>`
- *
- * But will ignore strings like:
- *
- * - `<strong>Home</strong>`
- * - `<div class="strong">Home</strong>`
- * - `<!-- strong -->`
- *
- * For checking the raw source code, use `seeInSource()`.
- *
- * @param string $text
- * @param array|string $selector optional
- * @see \Codeception\Lib\InnerBrowser::dontSee()
- */
- public function dontSee($text, $selector = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ``` php
- * <?php
- * $I->seeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeInSource()
- */
- public function canSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ``` php
- * <?php
- * $I->seeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * @see \Codeception\Lib\InnerBrowser::seeInSource()
- */
- public function seeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSource', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ```php
- * <?php
- * $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
- */
- public function cantSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current page contains the given string in its
- * raw source code.
- *
- * ```php
- * <?php
- * $I->dontSeeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
- */
- public function dontSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInSource', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there's a link with the specified text.
- * Give a full URL as the second parameter to match links with that exact URL.
- *
- * ``` php
- * <?php
- * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
- * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeLink()
- */
- public function canSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there's a link with the specified text.
- * Give a full URL as the second parameter to match links with that exact URL.
- *
- * ``` php
- * <?php
- * $I->seeLink('Logout'); // matches <a href="#">Logout</a>
- * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * @see \Codeception\Lib\InnerBrowser::seeLink()
- */
- public function seeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page doesn't contain a link with the given string.
- * If the second parameter is given, only links with a matching "href" attribute will be checked.
- *
- * ``` php
- * <?php
- * $I->dontSeeLink('Logout'); // I suppose user is not logged in
- * $I->dontSeeLink('Checkout now', '/store/cart.php');
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
- */
- public function cantSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page doesn't contain a link with the given string.
- * If the second parameter is given, only links with a matching "href" attribute will be checked.
- *
- * ``` php
- * <?php
- * $I->dontSeeLink('Logout'); // I suppose user is not logged in
- * $I->dontSeeLink('Checkout now', '/store/cart.php');
- * ?>
- * ```
- *
- * @param string $text
- * @param string $url optional
- * @see \Codeception\Lib\InnerBrowser::dontSeeLink()
- */
- public function dontSeeLink($text, $url = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current URI contains the given string.
- *
- * ``` php
- * <?php
- * // to match: /home/dashboard
- * $I->seeInCurrentUrl('home');
- * // to match: /users/1
- * $I->seeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
- */
- public function canSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current URI contains the given string.
- *
- * ``` php
- * <?php
- * // to match: /home/dashboard
- * $I->seeInCurrentUrl('home');
- * // to match: /users/1
- * $I->seeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()
- */
- public function seeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URI doesn't contain the given string.
- *
- * ``` php
- * <?php
- * $I->dontSeeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
- */
- public function cantSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URI doesn't contain the given string.
- *
- * ``` php
- * <?php
- * $I->dontSeeInCurrentUrl('/users/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
- */
- public function dontSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL is equal to the given string.
- * Unlike `seeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
- */
- public function canSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL is equal to the given string.
- * Unlike `seeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
- */
- public function seeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL doesn't equal the given string.
- * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // current url is not root
- * $I->dontSeeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
- */
- public function cantSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL doesn't equal the given string.
- * Unlike `dontSeeInCurrentUrl`, this only matches the full URL.
- *
- * ``` php
- * <?php
- * // current url is not root
- * $I->dontSeeCurrentUrlEquals('/');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
- */
- public function dontSeeCurrentUrlEquals($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL matches the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlMatches('~^/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
- */
- public function canSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the current URL matches the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->seeCurrentUrlMatches('~^/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
- */
- public function seeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current url doesn't match the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
- */
- public function cantSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that current url doesn't match the given regular expression.
- *
- * ``` php
- * <?php
- * // to match root url
- * $I->dontSeeCurrentUrlMatches('~^/users/(\d+)~');
- * ?>
- * ```
- *
- * @param string $uri
- * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
- */
- public function dontSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Executes the given regular expression against the current URI and returns the first capturing group.
- * If no parameters are provided, the full URI is returned.
- *
- * ``` php
- * <?php
- * $user_id = $I->grabFromCurrentUrl('~^/user/(\d+)/~');
- * $uri = $I->grabFromCurrentUrl();
- * ?>
- * ```
- *
- * @param string $uri optional
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
- */
- public function grabFromCurrentUrl($uri = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the specified checkbox is checked.
- *
- * ``` php
- * <?php
- * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
- * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
- * ?>
- * ```
- *
- * @param $checkbox
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
- */
- public function canSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the specified checkbox is checked.
- *
- * ``` php
- * <?php
- * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.
- * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');
- * ?>
- * ```
- *
- * @param $checkbox
- * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
- */
- public function seeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Check that the specified checkbox is unchecked.
- *
- * ``` php
- * <?php
- * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
- * ?>
- * ```
- *
- * @param $checkbox
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
- */
- public function cantSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Check that the specified checkbox is unchecked.
- *
- * ``` php
- * <?php
- * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms
- * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.
- * ?>
- * ```
- *
- * @param $checkbox
- * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
- */
- public function dontSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value.
- * Fields are matched by label text, the "name" attribute, CSS, or XPath.
- *
- * ``` php
- * <?php
- * $I->seeInField('Body','Type your comment here');
- * $I->seeInField('form textarea[name=body]','Type your comment here');
- * $I->seeInField('form input[type=hidden]','hidden_value');
- * $I->seeInField('#searchform input','Search');
- * $I->seeInField('//form/*[@name=search]','Search');
- * $I->seeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeInField()
- */
- public function canSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value.
- * Fields are matched by label text, the "name" attribute, CSS, or XPath.
- *
- * ``` php
- * <?php
- * $I->seeInField('Body','Type your comment here');
- * $I->seeInField('form textarea[name=body]','Type your comment here');
- * $I->seeInField('form input[type=hidden]','hidden_value');
- * $I->seeInField('#searchform input','Search');
- * $I->seeInField('//form/*[@name=search]','Search');
- * $I->seeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Lib\InnerBrowser::seeInField()
- */
- public function seeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that an input field or textarea doesn't contain the given value.
- * For fuzzy locators, the field is matched by label text, CSS and XPath.
- *
- * ``` php
- * <?php
- * $I->dontSeeInField('Body','Type your comment here');
- * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
- * $I->dontSeeInField('form input[type=hidden]','hidden_value');
- * $I->dontSeeInField('#searchform input','Search');
- * $I->dontSeeInField('//form/*[@name=search]','Search');
- * $I->dontSeeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
- */
- public function cantSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that an input field or textarea doesn't contain the given value.
- * For fuzzy locators, the field is matched by label text, CSS and XPath.
- *
- * ``` php
- * <?php
- * $I->dontSeeInField('Body','Type your comment here');
- * $I->dontSeeInField('form textarea[name=body]','Type your comment here');
- * $I->dontSeeInField('form input[type=hidden]','hidden_value');
- * $I->dontSeeInField('#searchform input','Search');
- * $I->dontSeeInField('//form/*[@name=search]','Search');
- * $I->dontSeeInField(['name' => 'search'], 'Search');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Lib\InnerBrowser::dontSeeInField()
- */
- public function dontSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are set on the form matched with the
- * passed selector.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('form[name=myform]', [
- * 'input1' => 'value',
- * 'input2' => 'other value',
- * ]);
- * ?>
- * ```
- *
- * For multi-select elements, or to check values of multiple elements with the same name, an
- * array may be passed:
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('.form-class', [
- * 'multiselect' => [
- * 'value1',
- * 'value2',
- * ],
- * 'checkbox[]' => [
- * 'a checked value',
- * 'another checked value',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('#form-id', [
- * 'checkbox1' => true, // passes if checked
- * 'checkbox2' => false, // passes if unchecked
- * ]);
- * ?>
- * ```
- *
- * Pair this with submitForm for quick testing magic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('//form[@id=my-form]', $form);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
- */
- public function canSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are set on the form matched with the
- * passed selector.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('form[name=myform]', [
- * 'input1' => 'value',
- * 'input2' => 'other value',
- * ]);
- * ?>
- * ```
- *
- * For multi-select elements, or to check values of multiple elements with the same name, an
- * array may be passed:
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('.form-class', [
- * 'multiselect' => [
- * 'value1',
- * 'value2',
- * ],
- * 'checkbox[]' => [
- * 'a checked value',
- * 'another checked value',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->seeInFormFields('#form-id', [
- * 'checkbox1' => true, // passes if checked
- * 'checkbox2' => false, // passes if unchecked
- * ]);
- * ?>
- * ```
- *
- * Pair this with submitForm for quick testing magic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('//form[@id=my-form]', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('//form[@id=my-form]', $form);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
- */
- public function seeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are not set on the form matched with
- * the passed selector.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('form[name=myform]', [
- * 'input1' => 'non-existent value',
- * 'input2' => 'other non-existent value',
- * ]);
- * ?>
- * ```
- *
- * To check that an element hasn't been assigned any one of many values, an array can be passed
- * as the value:
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('.form-class', [
- * 'fieldName' => [
- * 'This value shouldn\'t be set',
- * 'And this value shouldn\'t be set',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('#form-id', [
- * 'checkbox1' => true, // fails if checked
- * 'checkbox2' => false, // fails if unchecked
- * ]);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
- */
- public function cantSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks if the array of form parameters (name => value) are not set on the form matched with
- * the passed selector.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('form[name=myform]', [
- * 'input1' => 'non-existent value',
- * 'input2' => 'other non-existent value',
- * ]);
- * ?>
- * ```
- *
- * To check that an element hasn't been assigned any one of many values, an array can be passed
- * as the value:
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('.form-class', [
- * 'fieldName' => [
- * 'This value shouldn\'t be set',
- * 'And this value shouldn\'t be set',
- * ],
- * ]);
- * ?>
- * ```
- *
- * Additionally, checkbox values can be checked with a boolean.
- *
- * ``` php
- * <?php
- * $I->dontSeeInFormFields('#form-id', [
- * 'checkbox1' => true, // fails if checked
- * 'checkbox2' => false, // fails if unchecked
- * ]);
- * ?>
- * ```
- *
- * @param $formSelector
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
- */
- public function dontSeeInFormFields($formSelector, $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInFormFields', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Submits the given form on the page, with the given form
- * values. Pass the form field's values as an array in the second
- * parameter.
- *
- * Although this function can be used as a short-hand version of
- * `fillField()`, `selectOption()`, `click()` etc. it has some important
- * differences:
- *
- * * Only field *names* may be used, not CSS/XPath selectors nor field labels
- * * If a field is sent to this function that does *not* exist on the page,
- * it will silently be added to the HTTP request. This is helpful for testing
- * some types of forms, but be aware that you will *not* get an exception
- * like you would if you called `fillField()` or `selectOption()` with
- * a missing field.
- *
- * Fields that are not provided will be filled by their values from the page,
- * or from any previous calls to `fillField()`, `selectOption()` etc.
- * You don't need to click the 'Submit' button afterwards.
- * This command itself triggers the request to form's action.
- *
- * You can optionally specify which button's value to include
- * in the request with the last parameter (as an alternative to
- * explicitly setting its value in the second parameter), as
- * button values are not otherwise included in the request.
- *
- * Examples:
- *
- * ``` php
- * <?php
- * $I->submitForm('#login', [
- * 'login' => 'davert',
- * 'password' => '123456'
- * ]);
- * // or
- * $I->submitForm('#login', [
- * 'login' => 'davert',
- * 'password' => '123456'
- * ], 'submitButtonName');
- *
- * ```
- *
- * For example, given this sample "Sign Up" form:
- *
- * ``` html
- * <form action="/sign_up">
- * Login:
- * <input type="text" name="user[login]" /><br/>
- * Password:
- * <input type="password" name="user[password]" /><br/>
- * Do you agree to our terms?
- * <input type="checkbox" name="user[agree]" /><br/>
- * Select pricing plan:
- * <select name="plan">
- * <option value="1">Free</option>
- * <option value="2" selected="selected">Paid</option>
- * </select>
- * <input type="submit" name="submitButton" value="Submit" />
- * </form>
- * ```
- *
- * You could write the following to submit it:
- *
- * ``` php
- * <?php
- * $I->submitForm(
- * '#userForm',
- * [
- * 'user' => [
- * 'login' => 'Davert',
- * 'password' => '123456',
- * 'agree' => true
- * ]
- * ],
- * 'submitButton'
- * );
- * ```
- * Note that "2" will be the submitted value for the "plan" field, as it is
- * the selected option.
- *
- * You can also emulate a JavaScript submission by not specifying any
- * buttons in the third parameter to submitForm.
- *
- * ```php
- * <?php
- * $I->submitForm(
- * '#userForm',
- * [
- * 'user' => [
- * 'login' => 'Davert',
- * 'password' => '123456',
- * 'agree' => true
- * ]
- * ]
- * );
- * ```
- *
- * This function works well when paired with `seeInFormFields()`
- * for quickly testing CRUD interfaces and form validation logic.
- *
- * ``` php
- * <?php
- * $form = [
- * 'field1' => 'value',
- * 'field2' => 'another value',
- * 'checkbox1' => true,
- * // ...
- * ];
- * $I->submitForm('#my-form', $form, 'submitButton');
- * // $I->amOnPage('/path/to/form-page') may be needed
- * $I->seeInFormFields('#my-form', $form);
- * ```
- *
- * Parameter values can be set to arrays for multiple input fields
- * of the same name, or multi-select combo boxes. For checkboxes,
- * you can use either the string value or boolean `true`/`false` which will
- * be replaced by the checkbox's value in the DOM.
- *
- * ``` php
- * <?php
- * $I->submitForm('#my-form', [
- * 'field1' => 'value',
- * 'checkbox' => [
- * 'value of first checkbox',
- * 'value of second checkbox',
- * ],
- * 'otherCheckboxes' => [
- * true,
- * false,
- * false
- * ],
- * 'multiselect' => [
- * 'first option value',
- * 'second option value'
- * ]
- * ]);
- * ```
- *
- * Mixing string and boolean values for a checkbox's value is not supported
- * and may produce unexpected results.
- *
- * Field names ending in `[]` must be passed without the trailing square
- * bracket characters, and must contain an array for its value. This allows
- * submitting multiple values with the same name, consider:
- *
- * ```php
- * <?php
- * // This will NOT work correctly
- * $I->submitForm('#my-form', [
- * 'field[]' => 'value',
- * 'field[]' => 'another value', // 'field[]' is already a defined key
- * ]);
- * ```
- *
- * The solution is to pass an array value:
- *
- * ```php
- * <?php
- * // This way both values are submitted
- * $I->submitForm('#my-form', [
- * 'field' => [
- * 'value',
- * 'another value',
- * ]
- * ]);
- * ```
- *
- * @param $selector
- * @param $params
- * @param $button
- * @see \Codeception\Lib\InnerBrowser::submitForm()
- */
- public function submitForm($selector, $params, $button = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Fills a text field or textarea with the given string.
- *
- * ``` php
- * <?php
- * $I->fillField("//input[@type='text']", "Hello World!");
- * $I->fillField(['name' => 'email'], 'jon@mail.com');
- * ?>
- * ```
- *
- * @param $field
- * @param $value
- * @see \Codeception\Lib\InnerBrowser::fillField()
- */
- public function fillField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('fillField', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Selects an option in a select tag or in radio button group.
- *
- * ``` php
- * <?php
- * $I->selectOption('form select[name=account]', 'Premium');
- * $I->selectOption('form input[name=payment]', 'Monthly');
- * $I->selectOption('//form/select[@name=account]', 'Monthly');
- * ?>
- * ```
- *
- * Provide an array for the second argument to select multiple options:
- *
- * ``` php
- * <?php
- * $I->selectOption('Which OS do you use?', array('Windows','Linux'));
- * ?>
- * ```
- *
- * Or provide an associative array for the second argument to specifically define which selection method should be used:
- *
- * ``` php
- * <?php
- * $I->selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows'
- * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows'
- * ?>
- * ```
- *
- * @param $select
- * @param $option
- * @see \Codeception\Lib\InnerBrowser::selectOption()
- */
- public function selectOption($select, $option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Ticks a checkbox. For radio buttons, use the `selectOption` method instead.
- *
- * ``` php
- * <?php
- * $I->checkOption('#agree');
- * ?>
- * ```
- *
- * @param $option
- * @see \Codeception\Lib\InnerBrowser::checkOption()
- */
- public function checkOption($option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Unticks a checkbox.
- *
- * ``` php
- * <?php
- * $I->uncheckOption('#notify');
- * ?>
- * ```
- *
- * @param $option
- * @see \Codeception\Lib\InnerBrowser::uncheckOption()
- */
- public function uncheckOption($option) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Attaches a file relative to the Codeception `_data` directory to the given file upload field.
- *
- * ``` php
- * <?php
- * // file is stored in 'tests/_data/prices.xls'
- * $I->attachFile('input[@type="file"]', 'prices.xls');
- * ?>
- * ```
- *
- * @param $field
- * @param $filename
- * @see \Codeception\Lib\InnerBrowser::attachFile()
- */
- public function attachFile($field, $filename) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * If your page triggers an ajax request, you can perform it manually.
- * This action sends a GET ajax request with specified params.
- *
- * See ->sendAjaxPostRequest for examples.
- *
- * @param $uri
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
- */
- public function sendAjaxGetRequest($uri, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * If your page triggers an ajax request, you can perform it manually.
- * This action sends a POST ajax request with specified params.
- * Additional params can be passed as array.
- *
- * Example:
- *
- * Imagine that by clicking checkbox you trigger ajax request which updates user settings.
- * We emulate that click by running this ajax request manually.
- *
- * ``` php
- * <?php
- * $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST
- * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
- *
- * ```
- *
- * @param $uri
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
- */
- public function sendAjaxPostRequest($uri, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * If your page triggers an ajax request, you can perform it manually.
- * This action sends an ajax request with specified method and params.
- *
- * Example:
- *
- * You need to perform an ajax request specifying the HTTP method.
- *
- * ``` php
- * <?php
- * $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
- *
- * ```
- *
- * @param $method
- * @param $uri
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
- */
- public function sendAjaxRequest($method, $uri, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Finds and returns the text contents of the given element.
- * If a fuzzy locator is used, the element is found using CSS, XPath,
- * and by matching the full page source by regular expression.
- *
- * ``` php
- * <?php
- * $heading = $I->grabTextFrom('h1');
- * $heading = $I->grabTextFrom('descendant-or-self::h1');
- * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi'); // match with a regex
- * ?>
- * ```
- *
- * @param $cssOrXPathOrRegex
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::grabTextFrom()
- */
- public function grabTextFrom($cssOrXPathOrRegex) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs the value of the given attribute value from the given element.
- * Fails if element is not found.
- *
- * ``` php
- * <?php
- * $I->grabAttributeFrom('#tooltip', 'title');
- * ?>
- * ```
- *
- *
- * @param $cssOrXpath
- * @param $attribute
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()
- */
- public function grabAttributeFrom($cssOrXpath, $attribute) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs either the text content, or attribute values, of nodes
- * matched by $cssOrXpath and returns them as an array.
- *
- * ```html
- * <a href="#first">First</a>
- * <a href="#second">Second</a>
- * <a href="#third">Third</a>
- * ```
- *
- * ```php
- * <?php
- * // would return ['First', 'Second', 'Third']
- * $aLinkText = $I->grabMultiple('a');
- *
- * // would return ['#first', '#second', '#third']
- * $aLinks = $I->grabMultiple('a', 'href');
- * ?>
- * ```
- *
- * @param $cssOrXpath
- * @param $attribute
- * @return string[]
- * @see \Codeception\Lib\InnerBrowser::grabMultiple()
- */
- public function grabMultiple($cssOrXpath, $attribute = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabMultiple', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * @param $field
- *
- * @return array|mixed|null|string
- * @see \Codeception\Lib\InnerBrowser::grabValueFrom()
- */
- public function grabValueFrom($field) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs a cookie value.
- * You can set additional cookie params like `domain`, `path` in array passed as last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::grabCookie()
- */
- public function grabCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Grabs current page source code.
- *
- * @throws ModuleException if no page was opened.
- *
- * @return string Current page source code.
- * @see \Codeception\Lib\InnerBrowser::grabPageSource()
- */
- public function grabPageSource() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('grabPageSource', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a cookie with the given name is set.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * ``` php
- * <?php
- * $I->seeCookie('PHPSESSID');
- * ?>
- * ```
- *
- * @param $cookie
- * @param array $params
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeCookie()
- */
- public function canSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a cookie with the given name is set.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * ``` php
- * <?php
- * $I->seeCookie('PHPSESSID');
- * ?>
- * ```
- *
- * @param $cookie
- * @param array $params
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::seeCookie()
- */
- public function seeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there isn't a cookie with the given name.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
- */
- public function cantSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there isn't a cookie with the given name.
- * You can set additional cookie params like `domain`, `path` as array passed in last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
- */
- public function dontSeeCookie($cookie, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Unsets cookie with the given name.
- * You can set additional cookie params like `domain`, `path` in array passed as last argument.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::resetCookie()
- */
- public function resetCookie($name, $params = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page and is visible.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->seeElement('.error');
- * $I->seeElement('//form/input[1]');
- * $I->seeElement('input', ['name' => 'login']);
- * $I->seeElement('input', ['value' => '123456']);
- *
- * // strict locator in first arg, attributes in second
- * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @return
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeElement()
- */
- public function canSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element exists on the page and is visible.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->seeElement('.error');
- * $I->seeElement('//form/input[1]');
- * $I->seeElement('input', ['name' => 'login']);
- * $I->seeElement('input', ['value' => '123456']);
- *
- * // strict locator in first arg, attributes in second
- * $I->seeElement(['css' => 'form input'], ['name' => 'login']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @return
- * @see \Codeception\Lib\InnerBrowser::seeElement()
- */
- public function seeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element is invisible or not present on the page.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->dontSeeElement('.error');
- * $I->dontSeeElement('//form/input[1]');
- * $I->dontSeeElement('input', ['name' => 'login']);
- * $I->dontSeeElement('input', ['value' => '123456']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
- */
- public function cantSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given element is invisible or not present on the page.
- * You can also specify expected attributes of this element.
- *
- * ``` php
- * <?php
- * $I->dontSeeElement('.error');
- * $I->dontSeeElement('//form/input[1]');
- * $I->dontSeeElement('input', ['name' => 'login']);
- * $I->dontSeeElement('input', ['value' => '123456']);
- * ?>
- * ```
- *
- * @param $selector
- * @param array $attributes
- * @see \Codeception\Lib\InnerBrowser::dontSeeElement()
- */
- public function dontSeeElement($selector, $attributes = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there are a certain number of elements matched by the given locator on the page.
- *
- * ``` php
- * <?php
- * $I->seeNumberOfElements('tr', 10);
- * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements
- * ?>
- * ```
- * @param $selector
- * @param mixed $expected int or int[]
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
- */
- public function canSeeNumberOfElements($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that there are a certain number of elements matched by the given locator on the page.
- *
- * ``` php
- * <?php
- * $I->seeNumberOfElements('tr', 10);
- * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements
- * ?>
- * ```
- * @param $selector
- * @param mixed $expected int or int[]
- * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()
- */
- public function seeNumberOfElements($selector, $expected) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is selected.
- *
- * ``` php
- * <?php
- * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
- */
- public function canSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is selected.
- *
- * ``` php
- * <?php
- * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()
- */
- public function seeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is not selected.
- *
- * ``` php
- * <?php
- * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
- */
- public function cantSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the given option is not selected.
- *
- * ``` php
- * <?php
- * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
- * ?>
- * ```
- *
- * @param $selector
- * @param $optionText
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
- */
- public function dontSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Asserts that current page has 404 response status code.
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
- */
- public function canSeePageNotFound() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Asserts that current page has 404 response status code.
- * @see \Codeception\Lib\InnerBrowser::seePageNotFound()
- */
- public function seePageNotFound() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is equal to value provided.
- *
- * ```php
- * <?php
- * $I->seeResponseCodeIs(200);
- *
- * // recommended \Codeception\Util\HttpCode
- * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
- * ```
- *
- * @param $code
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
- */
- public function canSeeResponseCodeIs($code) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is equal to value provided.
- *
- * ```php
- * <?php
- * $I->seeResponseCodeIs(200);
- *
- * // recommended \Codeception\Util\HttpCode
- * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
- * ```
- *
- * @param $code
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
- */
- public function seeResponseCodeIs($code) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is between a certain range. Between actually means [from <= CODE <= to]
- *
- * @param $from
- * @param $to
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsBetween()
- */
- public function canSeeResponseCodeIsBetween($from, $to) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsBetween', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is between a certain range. Between actually means [from <= CODE <= to]
- *
- * @param $from
- * @param $to
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsBetween()
- */
- public function seeResponseCodeIsBetween($from, $to) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsBetween', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is equal to value provided.
- *
- * ```php
- * <?php
- * $I->dontSeeResponseCodeIs(200);
- *
- * // recommended \Codeception\Util\HttpCode
- * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
- * ```
- * @param $code
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
- */
- public function cantSeeResponseCodeIs($code) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that response code is equal to value provided.
- *
- * ```php
- * <?php
- * $I->dontSeeResponseCodeIs(200);
- *
- * // recommended \Codeception\Util\HttpCode
- * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
- * ```
- * @param $code
- * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
- */
- public function dontSeeResponseCodeIs($code) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeResponseCodeIs', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code 2xx
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsSuccessful()
- */
- public function canSeeResponseCodeIsSuccessful() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsSuccessful', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code 2xx
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsSuccessful()
- */
- public function seeResponseCodeIsSuccessful() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsSuccessful', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code 3xx
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsRedirection()
- */
- public function canSeeResponseCodeIsRedirection() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsRedirection', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code 3xx
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsRedirection()
- */
- public function seeResponseCodeIsRedirection() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsRedirection', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code is 4xx
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsClientError()
- */
- public function canSeeResponseCodeIsClientError() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsClientError', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code is 4xx
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsClientError()
- */
- public function seeResponseCodeIsClientError() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsClientError', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code is 5xx
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsServerError()
- */
- public function canSeeResponseCodeIsServerError() {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIsServerError', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the response code is 5xx
- * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIsServerError()
- */
- public function seeResponseCodeIsServerError() {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResponseCodeIsServerError', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title contains the given string.
- *
- * ``` php
- * <?php
- * $I->seeInTitle('Blog - Post #1');
- * ?>
- * ```
- *
- * @param $title
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::seeInTitle()
- */
- public function canSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title contains the given string.
- *
- * ``` php
- * <?php
- * $I->seeInTitle('Blog - Post #1');
- * ?>
- * ```
- *
- * @param $title
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::seeInTitle()
- */
- public function seeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title does not contain the given string.
- *
- * @param $title
- *
- * @return mixed
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
- */
- public function cantSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that the page title does not contain the given string.
- *
- * @param $title
- *
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()
- */
- public function dontSeeInTitle($title) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Switch to iframe or frame on the page.
- *
- * Example:
- * ``` html
- * <iframe name="another_frame" src="http://example.com">
- * ```
- *
- * ``` php
- * <?php
- * # switch to iframe
- * $I->switchToIframe("another_frame");
- * ```
- *
- * @param string $name
- * @see \Codeception\Lib\InnerBrowser::switchToIframe()
- */
- public function switchToIframe($name) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('switchToIframe', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Moves back in history.
- *
- * @param int $numberOfSteps (default value 1)
- * @see \Codeception\Lib\InnerBrowser::moveBack()
- */
- public function moveBack($numberOfSteps = null) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * @inheritdoc
- * @see \tests\codeception\common\_support\FixtureHelper::fixtures()
- */
- public function fixtures() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('fixtures', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Initialize the fixtures.
- * @since 2.0.12
- * @see \tests\codeception\common\_support\FixtureHelper::initFixtures()
- */
- public function initFixtures() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('initFixtures', func_get_args()));
- }
- }
|