本文整理匯總了PHP中WebGuy::seeResponseContainsJson方法的典型用法代碼示例。如果您正苦於以下問題:PHP WebGuy::seeResponseContainsJson方法的具體用法?PHP WebGuy::seeResponseContainsJson怎麽用?PHP WebGuy::seeResponseContainsJson使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WebGuy
的用法示例。
在下文中一共展示了WebGuy::seeResponseContainsJson方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <jayhealey@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('check AJAX call when the Codeception log check fails.');
$I->sendGET('logs?test=log_fail');
$I->seeResponseContainsJson(array('ready' => false, 'error' => "The Codeception Log directory does not exist. Please check the following path exists:"));
示例2: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <jayhealey@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('run a passing test');
$I->sendGET('run/acceptance/' . md5('acceptance' . 'TheTestThatPasses'));
$I->seeResponseContainsJson(array('message' => NULL, 'run' => true, 'passed' => true, 'state' => 'passed'));
示例3: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <jayhealey@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('run a failing test');
$I->sendGET('run/acceptance/' . md5('acceptance' . 'TheTestThatFails'));
$I->seeResponseContainsJson(array('run' => true, 'passed' => false, 'state' => 'failed'));
示例4: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <jayhealey@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('run test that does not exist to confirm the response');
$I->sendGET('run/lol/fake-test-id');
$I->seeResponseContainsJson(array('message' => 'The test could not be found.', 'run' => false, 'passed' => false, 'state' => 'error', 'log' => NULL));
示例5: WebGuy
<?php
/*
* This file is part of the Webception package.
*
* (c) James Healey <jayhealey@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$I = new WebGuy($scenario);
$I->wantTo('check AJAX call when executable passes.');
$I->sendGET('executable?test=pass');
$I->seeResponseContainsJson(array('ready' => true));