backdrop-contrib / mini_layouts

Provide blocks which allow positioning content within them in layouts.
GNU General Public License v2.0
7 stars 4 forks source link

Running `MiniLayoutsBlockTestCase` leads to fatal error #32

Closed argiepiano closed 1 year ago

argiepiano commented 2 years ago

Steps to reproduce

Enable simpletest and run MiniLayoutsBlockTestCase. (Backdrop 1.22.0 clean install)

Warning: include_once(/Users/alejandrocremaschi/Sites/localhost/bd120/modules/mini_layouts/tests/block.test): failed to open stream: No such file or directory in include_once() (line 173 of /Users/alejandrocremaschi/Sites/localhost/bd120/core/modules/simpletest/simpletest.module).
Warning: include_once(): Failed opening '/Users/alejandrocremaschi/Sites/localhost/bd120/modules/mini_layouts/tests/block.test' for inclusion (include_path='.:/Applications/MAMP/bin/php/php7.4.21/lib/php') in include_once() (line 173 of /Users/alejandrocremaschi/Sites/localhost/bd120/core/modules/simpletest/simpletest.module).
Error: Class 'MiniLayoutsBlockTestCase' not found in simpletest_run_tests() (line 174 of /Users/alejandrocremaschi/Sites/localhost/bd120/core/modules/simpletest/simpletest.module).
Notice: Undefined property: stdClass::$direction in template_preprocess_maintenance_page() (line 2895 of /Users/alejandrocremaschi/Sites/localhost/bd120/core/includes/theme.inc).

Additional information

BackdropWebTest::setUp() does not take any arguments. The MiniLayoutsBlockTestCase:setUp() method invokes parent::setUp('block_test');, trying to enable block_test, which is never enabled.

[EDIT: actually BackdropWebTest::setUp() does take arguments, retrieved with func_get_args();]

argiepiano commented 2 years ago

The issue is with the test info file. It has this line:

file = block.test

instead of:

file = mini_layouts.test

argiepiano commented 2 years ago

I guess the tests are not ready yet - many failures. Sorry about that...

indigoxela commented 2 years ago

I belief, it's related to https://github.com/backdrop-contrib/mini_layouts/issues/28, where the duplicate tests/mini_layouts_test/block_test.module got removed.

I guess the tests are not ready yet

Yes, that seems to be the case.