Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Problems when trying to test adminhtml config #239

Open
schrodervictor opened this issue Jan 26, 2015 · 1 comment
Open

Problems when trying to test adminhtml config #239

schrodervictor opened this issue Jan 26, 2015 · 1 comment
Labels

Comments

@schrodervictor
Copy link

Hi!
I'm trying to write some tests for a custom admin module and one of the things I need to check is the menu item existence, but it seems that my adminhtml.xml are not being loaded inside the test cases.

This is what I tried so far:

<?php
class MyModule_Adminsample_Test_Config_Global extends EcomDev_PHPUnit_Test_Case_Config
{
    /* ... some tests ... */

    public function testAdminMenuPosition()
    {
        $this->assertConfigNodeHasChild('adminhtml/menu/catalog/children', 'mymodule_adminsample_index');
    }

    /* ... some other tests ... */
}

The XML is okay (the menu item is showing on the page, under the catalog menu as expected), I var_dump'ed the config and noticed that everything I have in any adminhtml.xml is not being loaded.

I also tried to force loading them using the following, without success:

$this->app()->getConfig()->loadModulesConfiguration('adminhtml.xml', $this->app()->getConfig());

Am I missing something here or is it really a bug/limitation?

Thanks for the attention!

@IvanChepurnyi
Copy link
Member

There is no way for now to test adminhtml.xml files.

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

No branches or pull requests

2 participants