2016-08-03 18:28:12 +05:30
|
|
|
<?php
|
2019-02-21 01:28:52 +05:30
|
|
|
namespace api\tests\functional;
|
2016-08-03 18:28:12 +05:30
|
|
|
|
2019-02-21 01:28:52 +05:30
|
|
|
use api\tests\_pages\OptionsRoute;
|
|
|
|
use api\tests\FunctionalTester;
|
2016-08-03 18:28:12 +05:30
|
|
|
|
|
|
|
class OptionsCest {
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
private OptionsRoute $route;
|
2016-08-03 18:28:12 +05:30
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function _before(FunctionalTester $I): void {
|
2016-08-03 18:28:12 +05:30
|
|
|
$this->route = new OptionsRoute($I);
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function testRecaptchaPublicKey(FunctionalTester $I): void {
|
2016-08-03 18:28:12 +05:30
|
|
|
$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
|
|
|
}
|
|
|
|
|
|
|
|
}
|