-2

I'm using Symfony with functional test.

I have a login controller where the user sends user&password. The controller checks if the user and password are exist (and if the password is right by password hash).

I wish to test it by php unit

The problem I don't know where to store the real user and password for the tests. I don't wish to write every time them and I don't wish to store on the code (and after on the public repository).

The test are done in local (localhost) and on the real server.

Have you some idea what it is the better solution?

yalabef21
  • 151
  • 9

2 Answers2

0

Using mod-sec before the prod-server and to remove it during the test session.

snorlax
  • 157
  • 2
  • 3
  • 10
0

You can use different database for test environment in env.test file database env. Before tests use fixture for init data like user ...

jikaill
  • 61
  • 4
  • 12