当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionalTester::canSeeResponseCodeIs方法代码示例

本文整理汇总了PHP中FunctionalTester::canSeeResponseCodeIs方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::canSeeResponseCodeIs方法的具体用法?PHP FunctionalTester::canSeeResponseCodeIs怎么用?PHP FunctionalTester::canSeeResponseCodeIs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FunctionalTester的用法示例。


在下文中一共展示了FunctionalTester::canSeeResponseCodeIs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: memberCantVisitAnotherBalancePage

 public function memberCantVisitAnotherBalancePage(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I cant view someone elses balance page');
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     $I->amOnPage('/account/3/balance');
     $I->canSeeResponseCodeIs(403);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:10,代码来源:MemberCest.php

示例2: memberCantVisitPaymentPage

 public function memberCantVisitPaymentPage(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I cant view the payments page');
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     $I->amOnPage('/payments');
     $I->canSeeResponseCodeIs(403);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:10,代码来源:AdminPaymentsManagementCest.php

示例3: memberCantCreateEntry

 public function memberCantCreateEntry(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I cant create an equipment entry');
     //Load and login a known member
     $I->loginNormalMember();
     $I->amOnPage('/equipment');
     $I->cantSee('Record a new item');
     $I->amOnPage('/equipment/create');
     $I->canSeeResponseCodeIs(403);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:11,代码来源:EquipmentCest.php

示例4: getNoErrorIfAssetsAreDumped

 public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
 {
     $I->bootKernelWith('customized');
     $I->runCommand('maba_webpack.command.setup');
     $I->seeFileFound(__DIR__ . '/Fixtures/package.json');
     $I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
     $I->runCommand('maba_webpack.command.compile');
     $I->seeCommandStatusCode(0);
     $I->seeInCommandDisplay('webpack');
     $I->dontSeeInCommandDisplay('error');
     $I->amOnPage('/customized');
     $I->canSeeResponseCodeIs(200);
     $I->dontSee('Manifest file not found');
     $I->seeInSource('<link rel="stylesheet" id="css1" href="/assets/');
     $href = $I->grabAttributeFrom('link#css1', 'href');
     preg_match('#/assets/(.*)#', $href, $matches);
     $I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->canSeeInThisFile('.green');
     $I->canSeeInThisFile('.red');
     $I->canSeeInThisFile('-ms-fullscreen a.css');
     $I->amGoingTo('Check if less file was compiled');
     $I->canSeeInThisFile('color: #123456');
     $I->canSeeInThisFile('-ms-fullscreen a.less');
     $I->amGoingTo('Check if sass file was compiled');
     $I->canSeeInThisFile('color: #654321');
     $I->canSeeInThisFile('-ms-fullscreen a.scss');
     $I->amGoingTo('Check if cat.png was included');
     $I->canSeeInThisFile('background: url(/assets/');
     $I->seeInSource('<link rel="stylesheet" id="css2" href="/assets/');
     $href = $I->grabAttributeFrom('link#css2', 'href');
     preg_match('#/assets/(.*)#', $href, $matches);
     $I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->canSeeInThisFile('color: #123456');
     $I->seeInSource('<script src="/assets/');
     $src = $I->grabAttributeFrom('script', 'src');
     preg_match('#/assets/(.*)#', $src, $matches);
     $I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->openFile(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->canSeeInThisFile('additional-asset-content');
     $I->canSeeInThisFile('additional asset B');
     $I->canSeeInThisFile('app-asset-content');
     $I->dontSeeInThisFile('featureA-content');
     $I->dontSeeInThisFile('featureB-content');
     $I->seeInSource('<img src="/assets/');
     $src = $I->grabAttributeFrom('img', 'src');
     preg_match('#/assets/(.*)#', $src, $matches);
     $I->seeFileFound(__DIR__ . '/Fixtures/web/assets/' . $matches[1]);
     $I->seeFileIsSmallerThan(__DIR__ . '/Fixtures/web/assets/' . $matches[1], __DIR__ . '/Fixtures/src/Resources/assets/cat.png');
 }
开发者ID:mariusbalcytis,项目名称:webpack-bundle,代码行数:51,代码来源:CustomizedCest.php

示例5: getNoErrorIfAssetsAreDumped

 public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
 {
     $I->bootKernelWith();
     $I->runCommand('maba_webpack.command.setup');
     $I->seeFileFound(__DIR__ . '/Fixtures/package.json');
     $I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
     $I->runCommand('maba_webpack.command.compile');
     $I->seeCommandStatusCode(0);
     $I->seeInCommandDisplay('webpack');
     $I->dontSeeInCommandDisplay('error');
     $I->amOnPage('/');
     $I->canSeeResponseCodeIs(200);
     $I->dontSee('Manifest file not found');
     $I->dontSeeInSource('<link rel="stylesheet"');
     $I->seeInSource('<script src="http://localhost:8080/compiled/');
     $src = $I->grabAttributeFrom('script', 'src');
     preg_match('#http://localhost:8080/compiled/(.*)#', $src, $matches);
     $I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
     $I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
     $I->canSeeInThisFile('.green');
     $I->canSeeInThisFile('.red');
 }
开发者ID:mariusbalcytis,项目名称:webpack-bundle,代码行数:22,代码来源:CompileCest.php

示例6: getNoErrorIfAssetsAreDumped

 public function getNoErrorIfAssetsAreDumped(FunctionalTester $I)
 {
     $I->bootKernelWith('tags');
     $I->runCommand('maba_webpack.command.setup');
     $I->seeFileFound(__DIR__ . '/Fixtures/package.json');
     $I->seeFileFound(__DIR__ . '/Fixtures/app/config/webpack.config.js');
     $I->runCommand('maba_webpack.command.compile');
     $I->seeCommandStatusCode(0);
     $I->seeInCommandDisplay('webpack');
     $I->dontSeeInCommandDisplay('error');
     $I->amOnPage('/tags');
     $I->canSeeResponseCodeIs(200);
     $I->dontSee('Manifest file not found');
     $I->canSeeNumberOfElements('link[rel=stylesheet]', 3);
     $urlList = $I->grabMultiple('link', 'href');
     foreach ($urlList as $i => $url) {
         preg_match('#/compiled/(.*)#', $url, $matches);
         $I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
         $I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
         $I->canSeeInThisFile('.class' . $i . ' {');
     }
     $I->canSeeNumberOfElements('script', 2);
     $urlList = $I->grabMultiple('script', 'src');
     foreach ($urlList as $i => $url) {
         preg_match('#/compiled/(.*)#', $url, $matches);
         $I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
         $I->openFile(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
         $I->canSeeInThisFile('function f' . $i . '() {');
     }
     $I->canSeeNumberOfElements('img', 2);
     $urlList = $I->grabMultiple('img', 'src');
     foreach ($urlList as $i => $url) {
         preg_match('#/compiled/(.*)#', $url, $matches);
         $I->seeFileFound(__DIR__ . '/Fixtures/web/compiled/' . $matches[1]);
     }
 }
开发者ID:mariusbalcytis,项目名称:webpack-bundle,代码行数:36,代码来源:TagsCest.php

示例7: memberCantEditUnstartedProposal

 public function memberCantEditUnstartedProposal(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I cannt edit a proposal');
     //Create a proposal that's currently open
     $startDate = Carbon::now()->addDays(2)->format('Y-m-d');
     $endDate = Carbon::now()->addDays(5)->format('Y-m-d');
     $I->haveInDatabase('proposals', ['id' => 5, 'title' => 'Proposal 2', 'description' => 'Demo Description', 'user_id' => '3', 'start_date' => $startDate, 'end_date' => $endDate]);
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     //Make sure I cant visit the edit page
     $I->amOnPage('proposals/5/edit');
     $I->canSeeResponseCodeIs(403);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:15,代码来源:ProposalsCest.php


注:本文中的FunctionalTester::canSeeResponseCodeIs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。