Skip to content

Fixture Factory & CakeDC/Users #160

Discussion options

You must be logged in to vote

Hi @Petrucheqa,

thanks for the input. The answer lies in the stack trace :-)
Application.php's bootstrap will indeed load the configuration. But you probably call the factory before the Application gets loaded.
In your factory's default template, you probably have a default password value. The setter in Entity/User.php:66 will thus be triggered.
Therefor, the config is not loaded yet by the time you call the factory.

Since this config is vital for the UserFactory, I would load the config, if not loaded, in the initialize() method of the factory.

If this is not clear, you can paste your test, and I'll pinpoint the explanation above.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pabloelcolombiano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants