Skip to content
Snippets Groups Projects
Commit e00513bf authored by Sebastien Curt's avatar Sebastien Curt
Browse files

deactivate gregwar_captcha for tests

parent cc79cc7c
No related branches found
No related tags found
1 merge request!8Tuleap 40 register
......@@ -6,4 +6,3 @@ PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="mysql://rekallfrwsmember:sm4SyZVPu6wpjZfg@mysql:3306/rekallfrwsmember?serverVersion=5.6&charset=utf8"
\ No newline at end of file
BY_PASS_CODE=ed156b9188ecddf0c556d5712f0a84cc
\ No newline at end of file
gregwar_captcha:
disabled: true
\ No newline at end of file
......@@ -3,9 +3,6 @@
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
app.captcha_bypass : '%env(string:BY_PASS_CODE)%'
services:
# default configuration for services in *this* file
_defaults:
......@@ -22,9 +19,5 @@ services:
- '../src/Kernel.php'
- '../src/Tests/'
App\Form\RegistrationFormType:
arguments:
$byPass: '%app.captcha_bypass%'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
......@@ -19,9 +19,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator;
class RegistrationFormType extends AbstractType
{
private string $byPass;
public function __construct(string $byPass){
$this->byPass = $byPass;
public function __construct(){
}
public function buildForm(FormBuilderInterface $builder, array $options): void
......@@ -72,8 +70,7 @@ class RegistrationFormType extends AbstractType
'required' => false,
'reload' => true,
'as_url' => true,
'row_attr' => $row_attr,
'bypass_code' => $this->byPass
'row_attr' => $row_attr
])
->add('submit', SubmitType::class, ['label' => 'Register', 'row_attr' => $row_attr])
;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment