2016-08-03 18:28:12 +05:30
|
|
|
<?php
|
|
|
|
namespace codeception\api\functional;
|
|
|
|
|
|
|
|
use tests\codeception\api\_pages\OptionsRoute;
|
|
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
|
|
|
|
class OptionsCest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var OptionsRoute
|
|
|
|
*/
|
|
|
|
private $route;
|
|
|
|
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
|
|
$this->route = new OptionsRoute($I);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testRecaptchaPublicKey(FunctionalTester $I) {
|
|
|
|
$I->wantTo('Get recaptcha public key');
|
|
|
|
|
2016-08-04 00:17:36 +05:30
|
|
|
$this->route->get();
|
2016-08-03 18:28:12 +05:30
|
|
|
$I->canSeeResponseCodeIs(200);
|
2016-08-04 00:17:36 +05:30
|
|
|
$I->canSeeResponseIsJson();
|
|
|
|
$I->canSeeResponseContainsJson([
|
|
|
|
'reCaptchaPublicKey' => 'public-key',
|
|
|
|
]);
|
2016-08-03 18:28:12 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|