You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lithium tests heavily needs a resources/ directory which comes with a default app layout.
Testing Lithium's independently of that is hard, or not so cool because of a lot of skippings if resources isn't available.
I'm fixing exceptions raised when building with Travis, and a lot are essentially related to this same problem.
What could be done ?
having a "global" setUp() where we check if Libraries::get(true, 'resources') is available, and if not, creates a tmp folder near lithium's core, or use getenv('TMPDIR') as suggested @cgarvis on IRC
using Travis before_script and after_script in build configuration, where we manually creates a resources directory where tests are ran.
never test Lithium without a default app directories layout (Evil)
The text was updated successfully, but these errors were encountered:
I have an idea. As you can see here, if Lithium is bootstrapped from the console outside of an application, it just pretends that the default application lives in the current directory anyway.
I think if we just use this along with @cgarvis' idea, we can just add a line to that configuration like 'resources' => getenv('TMPDIR'), and everything should just work. However, while we're on the topic, there are also tests in Media (and possibly elsewhere) that depend on a webroot directory. I'm still trying to think through how to handle these, and/or if they have to just be rewritten completely. For now I would suggest just skipping them.
Lithium tests heavily needs a
resources/
directory which comes with a default app layout.Testing Lithium's independently of that is hard, or not so cool because of a lot of skippings if
resources
isn't available.I'm fixing exceptions raised when building with Travis, and a lot are essentially related to this same problem.
What could be done ?
Libraries::get(true, 'resources')
is available, and if not, creates atmp
folder near lithium's core, or usegetenv('TMPDIR')
as suggested @cgarvis on IRCbefore_script
andafter_script
in build configuration, where we manually creates a resources directory where tests are ran.The text was updated successfully, but these errors were encountered: