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

Problems when trying to test adminhtml config #239

Description

@schrodervictor

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!

Activity

  1. IvanChepurnyi commented on Jan 26, 2015

    @IvanChepurnyi
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions