Skip to content
Snippets Groups Projects
Commit 2d9564ba authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #40650 pre inscription fix tests fixtures

parent 450cfc00
Branches
Tags
4 merge requests!2334Master,!2161Dev#40650 contractuel 5255 dole preinscription en ligne bressuire concarneau ccvh,!2149Dev#40650 contractuel 5255 dole preinscription en ligne bressuire concarneau ccvh,!2147Dev#40650 contractuel 5255 dole preinscription en ligne bressuire concarneau ccvh
Pipeline #1454 failed with stage
in 9 minutes and 52 seconds
......@@ -286,12 +286,15 @@ class AuthControllerPreRegistrationNanookPostDispatchTest
$this->mock_web_client
->whenCalled('postData')
->with('http://super.nano.ok/ilsdi/arcadia/service/pre-register',
['site' => '1',
['site' => 1,
'lastName' => 'Jiro',
'firstName' => 'Tom',
'mail' => 'test@test.fr',
'password' => 'pwd',
'birthDate' => '2001-05-05'])
'password' => 'pwd123456',
'birthDate' => '2001-05-05',
'town' => 'titi',
'zipcode' => '123456',
'address' => '123'])
->answers(NanooKFixtures::xmlGetPatronInfoFrancoisMorel());
$this->postDispatch('/opac/auth/pre-registration', ['site' => '1',
......@@ -299,9 +302,12 @@ class AuthControllerPreRegistrationNanookPostDispatchTest
'firstName' => 'Tom',
'mail' => 'test@test.fr',
'mail2' => 'test@test.fr',
'password' => 'pwd',
'password2' => 'pwd',
'birthDate' => '2001-05-05']);
'password' => 'pwd123456',
'password2' => 'pwd123456',
'birthDate' => '2001-05-05',
'town' => 'titi',
'zipcode' => '123456',
'address' => '123']);
}
......@@ -313,7 +319,7 @@ class AuthControllerPreRegistrationNanookPostDispatchTest
/** @test */
public function responseShouldRedirectToPreRegistrationSuccess() {
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration-success/site/1/lastName/Jiro/firstName/Tom/mail/test%40test.fr/mail2/test%40test.fr/password/pwd/password2/pwd/birthDate/2001-05-05');
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration-success/site/1/lastName/Jiro/firstName/Tom/mail/test%40test.fr/mail2/test%40test.fr/password/pwd123456/password2/pwd123456/birthDate/2001-05-05/town/titi/zipcode/123456/address/123');
}
......@@ -334,12 +340,15 @@ class AuthControllerPreRegistrationNanookPostDispatchErrorTest
$this->mock_web_client
->whenCalled('postData')
->with('http://super.nano.ok/ilsdi/arcadia/service/pre-register',
['site' => '1',
['site' => 1,
'lastName' => 'Jiro',
'firstName' => 'Tom',
'mail' => 'test@test.fr',
'password' => 'pwd',
'birthDate' => '2001-05-05'])
'password' => 'pwd123456',
'birthDate' => '2001-05-05',
'town' => 'titi',
'zipcode' => '123456',
'address' => '123'])
->answers('<?xml version="1.0" encoding="UTF-8"?><error>PreRegisterUserError</error></>');
$this->postDispatch('/opac/auth/pre-registration', ['site' => '1',
......@@ -347,19 +356,24 @@ class AuthControllerPreRegistrationNanookPostDispatchErrorTest
'firstName' => 'Tom',
'mail' => 'test@test.fr',
'mail2' => 'test@test.fr',
'password' => 'pwd',
'password2' => 'pwd',
'birthDate' => '2001-05-05']);
'password' => 'pwd123456',
'password2' => 'pwd123456',
'birthDate' => '2001-05-05',
'town' => 'titi',
'zipcode' => '123456',
'address' => '123']);
}
/** @test */
public function responseShouldRedirectToPreRegistrationError() {
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration/site/1/lastName/Jiro/firstName/Tom/mail/test%40test.fr/mail2/test%40test.fr/password/pwd/password2/pwd/birthDate/2001-05-05');
$this->assertRedirectTo('http://localhost' . BASE_URL . '/auth/pre-registration/site/1/lastName/Jiro/firstName/Tom/mail/test%40test.fr/mail2/test%40test.fr/password/pwd123456/password2/pwd123456/birthDate/2001-05-05/town/titi/zipcode/123456/address/123');
}
}
class AuthControllerPreRegistrationWithNoPreRegistrationTest extends AuthControllerPreRegistrationNanookTestCase {
public function setUp() {
parent::setUp();
......@@ -368,7 +382,8 @@ class AuthControllerPreRegistrationWithNoPreRegistrationTest extends AuthControl
$this->dispatch('/opac/auth/pre-registration', true);
}
/** @test */
/** @test */
public function pageShouldDisplayErrorPreinscriptionDeactivated() {
$this->assertFlashMessengerContentContains('Cette fonctionnalité n\'est pas activé');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment