Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test HautelookAliceBundle with Faker Provider #23

Closed
wants to merge 7 commits into from

Conversation

alexislefebvre
Copy link
Owner

No description provided.

@alexislefebvre
Copy link
Owner Author

The error is:

  1. Liip\FunctionalTestBundle\Tests\Test\WebTestCaseTest::testLoadFixturesFilesWithHautelook
    InvalidArgumentException: Unknown formatter "foo"

It occurs with Symfony 2.8 and hautelook/alice-bundle v1.2.0.

@estahn
Copy link

estahn commented Feb 22, 2016

@alexislefebvre Sorry for the late response. Just had a look. The current test is setting up the container service manually. So the container definition set by symfony with your configuration is overwritten.

If you want to have your changes take affect delete the mocked service definition (line 351-355):

$fakerProcessorChain = new \Hautelook\AliceBundle\Faker\Provider\ProviderChain(array());

There is an error if some fixtures are loaded in the same test:

SQLSTATE[HY000]: General error: 17 database schema has changed
HautelookAliceBundle: use version ~1.2 only

PHPUnit: use ~5.1 instead of 5.1.*, it will install 5.2, the current version
Don't perform queries through the repository to check the data,
it caused this error:
SQLSTATE[HY000]: General error: 17 database schema has changed

Restore "hautelook/alice-bundle" = "~0.2|~1.2" (avoid errors with Symfony 2.3)
@alexislefebvre
Copy link
Owner Author

@estahn thanks a lot, I should have paid attention to the beginning of the test, I didn't see it was defining another provider, sorry. It should work now, I'll clean it and submit a PR to the upstream.

@alexislefebvre alexislefebvre deleted the test-faker-provider branch February 22, 2016 14:45
@alexislefebvre
Copy link
Owner Author

It has been moved to upstream:

https://github.com/liip/LiipFunctionalTestBundle/pull/246
https://github.com/liip/LiipFunctionalTestBundle/pull/247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants