symfony - Speedup symfony2 fixtures loading in tests with security.encoder_factory -


i create lot of users (using fosuserbundle user manager) in fixtures , load them on set tests. updatepassword() method takes lot of time execute, because calculates hash (very expensive operation) each user. how can speedup it?

what in own project change password encoder test environment faster compute bcrypt.

the testsuite not need store password safety provided bcrypt (the test database exists on developer machines or on travis, , uses weak passwords regularly anyway, , written in clear in tests).
using simpler encoder makes test run faster if create lot of users.

it important make such config change in config_test.yml file though. real environments must use safe password encoder.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -