EcomDev/EcomDev_PHPUnit

Controller test case symlink issue with block rendered.

Opened this issue · 0 comments

EcomDev_PHPUnit Symlink Controller Issue

I noticed an issue when calling $this->assertLayoutBlockRendered('content'); where the template has been rewritten in a new template which has been symlinked.

This can be resolved by using the fixture:

config:
  default/dev/template/allow_symlink: 1

But as this is a global configuration option there is no way to specify this over a whole test suite which causes discrepancies between development and near production environments.

Potential Fixes

  • Add node in phpunit.xml to allow for symlinks.
  • A global configuration fixture for all test cases.

Composer package with test that shows issue.

https://github.com/jzahedieh/JZahedieh_ThemeFallbackTest

I have written module with some tests which displays the failing behaviour, it does not really belong in the core tests as it adds a package and theme files.

This was based off issue #60

More details on this issue can be found in the repo readme.

Issue

I am not sure if this problem has been solve already so if anyone has a fix for this that would be great.