1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220 |
- <?php //[STAMP] 6ee87ddc4f5814a268a00ee7ba7200f6
- namespace _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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeNumberNewLines($number) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberNewLines', 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that contents of currently opened file matches $regex
- *
- * @param string $regex
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeFileContentsEqual($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
- */
- public function dontSeeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInThisFile', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeInThisFile($text) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Module\Filesystem::seeFileFound()
- */
- public function seeFileFound($filename, $path = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeFileFound($filename, $path = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Module\Filesystem::dontSeeFileFound()
- */
- public function dontSeeFileFound($filename, $path = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeFileFound', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks if file does not exist in path
- *
- * @param string $filename
- * @param string $path
- * @see \Codeception\Module\Filesystem::dontSeeFileFound()
- */
- public function cantSeeFileFound($filename, $path = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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.
- *
- * Authenticates a user on a site without submitting a 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 the `user` component to be enabled and configured.
- *
- * @param $user
- * @throws \Codeception\Exception\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.
- * The signature is the same as for the `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 a test (probably before the
- * cleanup transaction is started; `cleanup` option is `true` by default),
- * you can specify the fixtures in the `_fixtures()` method of a test case
- *
- * ```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 calling `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 an instance of ActiveFixture
- * $user = $I->grabFixture('users', 'user1');
- * ```
- *
- * @param $name
- * @return mixed
- * @throws \Codeception\Exception\ModuleException if the 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 a 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 = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a record exists in the 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 = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that a record exists in the database.
- *
- * ``` php
- * $I->seeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * @see \Codeception\Module\Yii2::seeRecord()
- */
- public function canSeeRecord($model, $attributes = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Checks that a record does not exist in the 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 = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeRecord', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that a record does not exist in the database.
- *
- * ``` php
- * $I->dontSeeRecord('app\models\User', array('name' => 'davert'));
- * ```
- *
- * @param $model
- * @param array $attributes
- * @part orm
- * @see \Codeception\Module\Yii2::dontSeeRecord()
- */
- public function cantSeeRecord($model, $attributes = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Retrieves a record from the 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 = []) {
- 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 a route as first argument and params as second
- *
- * ```
- * $I->amOnRoute('site/view', ['page' => 'about']);
- * ```
- *
- * @param string $route A route
- * @param array $params Additional route parameters
- * @see \Codeception\Module\Yii2::amOnRoute()
- */
- public function amOnRoute($route, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Opens the page for the given relative URI or route.
- *
- * ``` php
- * <?php
- * // opens front page
- * $I->amOnPage('/');
- * // opens /register page
- * $I->amOnPage('/register');
- * // opens customer view page for id 25
- * $I->amOnPage(['customer/view', 'id' => 25]);
- * ```
- *
- * @param string|array $page the URI or route in array format
- * @see \Codeception\Module\Yii2::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.
- *
- * Gets a component from the Yii container. Throws an exception if the
- * component is not available
- *
- * ```php
- * <?php
- * $mailer = $I->grabComponent('mailer');
- * ```
- *
- * @param $component
- * @return mixed
- * @throws \Codeception\Exception\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 an 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 \Codeception\Exception\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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that an 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 \Codeception\Exception\ModuleException
- * @part email
- * @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 no email was sent
- *
- * @part email
- * @see \Codeception\Module\Yii2::dontSeeEmailIsSent()
- */
- public function dontSeeEmailIsSent() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeEmailIsSent', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that no email was sent
- *
- * @part email
- * @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.
- *
- * Returns array of all sent email messages.
- * Each message implements the `yii\mail\MessageInterface` interface.
- * Useful to perform additional checks using the `Asserts` module:
- *
- * ```php
- * <?php
- * $I->seeEmailIsSent();
- * $messages = $I->grabSentEmails();
- * $I->assertEquals('admin@site,com', $messages[0]->getTo());
- * ```
- *
- * @part email
- * @return array
- * @throws \Codeception\Exception\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 the 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 $val 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, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * 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 string $username
- * @param string $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.
- *
- * 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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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\Action('dontSee', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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->dontSeeInSource('<h1>Green eggs & ham</h1>');
- * ```
- *
- * @param $raw
- * @see \Codeception\Lib\InnerBrowser::dontSeeInSource()
- */
- public function dontSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInSource', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeInSource($raw) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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 = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeLink', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeLink($text, $url = "") {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
- */
- public function dontSeeInCurrentUrl($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInCurrentUrl', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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\Action('dontSeeCurrentUrlEquals', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
- */
- public function dontSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCurrentUrlMatches', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeCurrentUrlMatches($uri) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
- */
- public function dontSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCheckboxIsChecked', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeCheckboxIsChecked($checkbox) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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\Action('dontSeeInField', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeInField($field, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Lib\InnerBrowser::seeInFormFields()
- */
- public function seeInFormFields($formSelector, array $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeInFormFields($formSelector, array $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 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, array $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInFormFields', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeInFormFields($formSelector, array $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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 id="userForm">
- * 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/>
- * Subscribe to our newsletter?
- * <input type="checkbox" name="user[newsletter]" value="1" checked="checked" /><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.
- *
- * To uncheck the pre-checked checkbox "newsletter", call `$I->uncheckOption(['name' => 'user[newsletter]']);` *before*,
- * then submit the form as shown here (i.e. without the "newsletter" field in the `$params` array).
- *
- * 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, array $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@example.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.
- *
- * Sends an ajax GET request with the passed parameters.
- * See `sendAjaxPostRequest()`
- *
- * @param $uri
- * @param $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
- */
- public function sendAjaxGetRequest($uri, $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sends an ajax POST request with the passed parameters.
- * The appropriate HTTP header is added automatically:
- * `X-Requested-With: XMLHttpRequest`
- * Example:
- * ``` php
- * <?php
- * $I->sendAjaxPostRequest('/add-task', ['task' => 'lorem ipsum']);
- * ```
- * Some frameworks (e.g. Symfony) create field names in the form of an "array":
- * `<input type="text" name="form[task]">`
- * In this case you need to pass the fields like this:
- * ``` php
- * <?php
- * $I->sendAjaxPostRequest('/add-task', ['form' => [
- * 'task' => 'lorem ipsum',
- * 'category' => 'miscellaneous',
- * ]]);
- * ```
- *
- * @param string $uri
- * @param array $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
- */
- public function sendAjaxPostRequest($uri, $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sends an ajax request, using the passed HTTP method.
- * See `sendAjaxPostRequest()`
- * Example:
- * ``` php
- * <?php
- * $I->sendAjaxRequest('PUT', '/posts/7', ['title' => 'new title']);
- * ```
- *
- * @param $method
- * @param $uri
- * @param array $params
- * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()
- */
- public function sendAjaxRequest($method, $uri, $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Use this method within an [interactive pause](https://codeception.com/docs/02-GettingStarted#Interactive-Pause) to save the HTML source code of the current page.
- *
- * ```php
- * <?php
- * $I->makeHtmlSnapshot('edit_page');
- * // saved to: tests/_output/debug/edit_page.html
- * $I->makeHtmlSnapshot();
- * // saved to: tests/_output/debug/2017-05-26_14-24-11_4b3403665fea6.html
- * ```
- *
- * @param null $name
- * @see \Codeception\Lib\InnerBrowser::makeHtmlSnapshot()
- */
- public function makeHtmlSnapshot($name = NULL) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('makeHtmlSnapshot', 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.
- * If the cookie is set by an ajax request (XMLHttpRequest), there might be some delay caused by the browser, so try `$I->wait(0.1)`.
- *
- * @param $cookie
- *
- * @param array $params
- * @return mixed
- * @see \Codeception\Lib\InnerBrowser::grabCookie()
- */
- public function grabCookie($cookie, array $params = []) {
- 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
- * @see \Codeception\Lib\InnerBrowser::seeCookie()
- */
- public function seeCookie($cookie, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeCookie($cookie, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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
- * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()
- */
- public function dontSeeCookie($cookie, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeCookie', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeCookie($cookie, array $params = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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($cookie, array $params = []) {
- 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
- * @see \Codeception\Lib\InnerBrowser::seeElement()
- */
- public function seeElement($selector, $attributes = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 canSeeElement($selector, $attributes = []) {
- 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 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 = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeElement', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeElement($selector, $attributes = []) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('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[]
- * @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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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\Action('dontSeeOptionIsSelected', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 cantSeeOptionIsSelected($selector, $optionText) {
- return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Asserts that current page has 404 response status code.
- * @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.
- *
- * 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 int $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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 int $code
- * @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 between a certain range. Between actually means [from <= CODE <= to]
- *
- * @param int $from
- * @param int $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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that response code is between a certain range. Between actually means [from <= CODE <= to]
- *
- * @param int $from
- * @param int $to
- * @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 equal to value provided.
- *
- * ```php
- * <?php
- * $I->dontSeeResponseCodeIs(200);
- *
- * // recommended \Codeception\Util\HttpCode
- * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
- * ```
- * @param int $code
- * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
- */
- public function dontSeeResponseCodeIs($code) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeResponseCodeIs', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 int $code
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that the response code 2xx
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that the response code 3xx
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that the response code is 4xx
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that the response code is 5xx
- * @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 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.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * 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 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 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\Action('dontSeeInTitle', func_get_args()));
- }
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * [!] Conditional Assertion: Test won't be stopped on fail
- * Checks that the page title does not contain the given string.
- *
- * @param $title
- *
- * @return mixed
- * @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.
- *
- * 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 = 1) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets SERVER parameters valid for all next requests.
- * this will remove old ones.
- *
- * ```php
- * $I->setServerParameters([]);
- * ```
- * @see \Codeception\Lib\InnerBrowser::setServerParameters()
- */
- public function setServerParameters(array $params) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('setServerParameters', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets SERVER parameter valid for all next requests.
- *
- * ```php
- * $I->haveServerParameter('name', 'value');
- * ```
- * @param string $name
- * @param string $value
- * @see \Codeception\Lib\InnerBrowser::haveServerParameter()
- */
- public function haveServerParameter($name, $value) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('haveServerParameter', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Prevents automatic redirects to be followed by the client.
- *
- * ```php
- * <?php
- * $I->stopFollowingRedirects();
- * ```
- *
- * @see \Codeception\Lib\InnerBrowser::stopFollowingRedirects()
- */
- public function stopFollowingRedirects() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('stopFollowingRedirects', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Enables automatic redirects to be followed by the client.
- *
- * ```php
- * <?php
- * $I->startFollowingRedirects();
- * ```
- *
- * @see \Codeception\Lib\InnerBrowser::startFollowingRedirects()
- */
- public function startFollowingRedirects() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('startFollowingRedirects', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Follow pending redirect if there is one.
- *
- * ```php
- * <?php
- * $I->followRedirect();
- * ```
- *
- * @see \Codeception\Lib\InnerBrowser::followRedirect()
- */
- public function followRedirect() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('followRedirect', func_get_args()));
- }
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Sets the maximum number of redirects that the Client can follow.
- *
- * ```php
- * <?php
- * $I->setMaxRedirects(2);
- * ```
- *
- * @param int $maxRedirects
- * @see \Codeception\Lib\InnerBrowser::setMaxRedirects()
- */
- public function setMaxRedirects($maxRedirects) {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('setMaxRedirects', func_get_args()));
- }
- }
|