Skip to content

[WIP] add webtests, first try frontend test #232

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

Closed
wants to merge 3 commits into from

Conversation

ElectricMaxxx
Copy link
Member

Q A
Bug fix? maybe
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets #230, parts of symfony-cmf/symfony-cmf-docs#444
License MIT
Doc PR need to be created

Please do not be confused, but i try to understand that Prefix/Candidates thing. To do that i (re-)activated the frontend test, do not know why they where not active. Then i created some routes, i just wanna play how idPrefix, staticPrefixand the candidates work together.

I got an issue with instantiating the database for the test - hope not to have it in travis.

@ElectricMaxxx
Copy link
Member Author

@wouterj, you know a difference in configuring the testing environment - the persistence in general? Got the same error localy. That can be the reason why web test are deactivated :-) but deactivating is no solution i think.

@ElectricMaxxx
Copy link
Member Author

seems to have problems to create the database:

PHPCR\RepositoryException: Unexpected error talking to the backend: An exception occurred while executing 'SELECT 1 FROM phpcr_workspaces WHERE name = ?' with params ["default"]:

got the same issue localy. Even if i try to intit by hand.

@ElectricMaxxx
Copy link
Member Author

In the last test you see my problem i wanted to show in #230 if i set an idPrefix on a document and getPath() is called everything is fine, but if i don't set it and call getPath() i got the exception (should be seen on travis).

Problem is: getPath() is called in almost every situation. The easiest is: RouteAdmin with the mapped form field path. So if i do not set any idPrefix i got that exception. Do i really need to set that prefix? Why not using the way that bundle used to work as default:
routes_basepath (admin_basepath now) removed from id is the path?

@ElectricMaxxx
Copy link
Member Author

This would be a use case where i would need a "stroke" function in github. All symfony-cmf base Route instances implements the PrefixInterface which trigger an update on the property by an listener. OK, so the tests are useless/non-sense.

@dbu
Copy link
Member

dbu commented Apr 15, 2014

your unit tests do not persist so the prefix things can indeed be tested that way. and i think it makes sense to test them.

i guess the web tests fail because the configuration for the route_basepaths is not set to /tests but at the default /cms/routes?

@frne frne mentioned this pull request Nov 21, 2014
4 tasks
@dbu
Copy link
Member

dbu commented Nov 24, 2014

#276 did activate the web test cases. @ElectricMaxxx would you mind rebasing and cleaning this up if there are relevant things left to do in this PR?

@lsmith77 lsmith77 added ready and removed in progress labels May 1, 2015
@dbu dbu closed this Jun 14, 2016
@lsmith77 lsmith77 removed the wip/poc label Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants