Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 31 through 45 (of 99 total)
  • Author
    Replies
  • in reply to: Functional Tests 401 #33751

    jakabadambalazs
    Participant

    THIS IS CRAZY! You won’t believe this!!!

    This is my phpunit.xml file in the project root:

    As you can see I have divided the test suites into Unit and Functional.

    If I remove the “MekitCRM Functional Test Suite” testsuite block, the unit test run and I get OK.

    If I remove the “MekitCRM Unit Test Suite” testsuite block, the functional tests run and I get OK.

    If I leave in both, my functional tests fail and I get 401!!!

    I have, since the very beginning, had this file like this – it’s been nearly 2 weeks I am trying to make this work, I have double checked and debugged nearly all files involved in this – just to realize that there is nothing wrong with neither oroPlatform neither with my code!!!

    Do you know why this happens?
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33749

    jakabadambalazs
    Participant

    Dear @yshyshkin – sorry that I am making you crazy about this stuff but I really want to make functional tests work.

    This is the current situation:
    1) clear oroBundle 1.6 stable
    2) one own bundle to test testing – no entities, simple controller with:
    /**
    * @Route(
    * "/{_format}",
    * name="mekit_playground_index",
    * requirements={"_format"="html|json"},
    * defaults={"_format" = "html"}
    * )
    * @Template
    * @return array
    */
    public function indexAction() {
    $data = [
    'dumpdata' => 'Nothing here'
    ];
    return $data;
    }

    3) and in twig I have:

    When I test this route with:
    public function testIndexAction() {
    $crawler = $this->client->request('GET', $this->getUrl('mekit_playground_index',[]));
    //$request = $this->client->getRequest();
    $result = $this->client->getResponse();
    $resCode = $result->getStatusCode();

    echo "\n\nRESULT($resCode): ";
    if(!$result->isOk()) {
    $exception = $crawler->filter('div.text-exception')->extract(['_text']);
    print_r($exception);
    } else {
    $exception = $crawler->filter('p.environment')->extract(['_text']);
    print_r($exception);
    }
    }

    I get 500! This is a real move forward!!!

    The exception I get is:

    The function “dump” does not exist in /home/jack/domains/master.mekitcrm.bradipo/MekitCrmApplication/src/Mekit/Bundle/PlaygroundBundle/Resources/views/Playground/index.html.twig at line 7

    So I checked on this and in my config_test.yml i have

    looking on some sf2 blogs I noticed that people suggest to use the class “Twig_Extension_Debug”

    so modifying the above yml to:

    I get green lights!!! 200!!! OK!

    So what is this Twig_Extensions_Extension_Debug class for and why do we not have the debug function in test environment (as we do in dev)?


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33748

    jakabadambalazs
    Participant

    Good news and Bad news! (good for you and bad for me);)

    I have tried them all! At the end, given that functional tests on oroPlatform by itself do work but on the deployment with my bundles (with same OroPlatform and identical vendors folder) fail the functional tests I started to think that there was something in my code causing the problem. (actually, this is where I should have started)

    In fact, if I remove the entire src folder where my codebase is, the oroPlatform functional tests work!

    So this leaves us with:

    1) You can remove the critical bug because whatever it is – it is not related to your code – the bug is not yours but mine.

    2) Now, one by one I’ll put back my bundles and I’ll try to track down which bundle/class/entity/whatever causes this havoc

    I’ll keep you posted
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: OroCRM Developer Trainings, August 2014 #24262

    jakabadambalazs
    Participant

    Hi @Soroka,

    That’s great!
    Too bad YT has added the target=”_blank” to the links – maybe there is some way to add a link without opening new tab/window – if I disover how to do it i’ll let you know
    Thanks
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33747

    jakabadambalazs
    Participant

    I have just checked out the platform @ commit 66565d741b4b1db0ea792c61bce1cb22d6e75e88 (1.6 stable) and as you said all tests are green!

    My other project based on the same commit (same apache/php platform and same config has the above problems). Even though I don’t really fancy doing this I’ll try to confront the two deployments – maybe I can find what is wrong.

    If I have unwantedly modified some of the files in the OroPlatform composer should tell me I did, right? well, this does not happen.

    So I am thinking about some difference in the config files under app/config that I might have changed.
    I really don’t know at this point.
    I’ll let you know if I have found something and if it is a real bug or not.

    Thanks for assisting me @yshyshkin!

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33745

    jakabadambalazs
    Participant

    How is that possible? Do you mean that this might be something related to my dev environment?

    I’ll make a new deployment and try to reproduce the problem and document the steps.


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33743

    jakabadambalazs
    Participant

    I’ll create new bug for that – we’ll fix it.

    Can you create it with SUPER-HIGH priority, pls? This makes platform and anything built on platform untestable!

    Thanks
    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Setting Default Country in Address to Primary Location #24898

    jakabadambalazs
    Participant

    Sounds good but too much hassle!

    If it is agreed that we can use the system configuration “oro_locale.country” === “Primary Location” to be set as the selected country on the oro.address.form.choose_country field when there is no data set, I’ll try to make a PR for this.

    a\


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33742

    jakabadambalazs
    Participant

    No, thanks to you!

    Just for reference:


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33740

    jakabadambalazs
    Participant

    After narly 24hrs of trying to make this work I did something really ugly (not a solution) but I wanted to see if this was the only error I have or if I can expect others.

    I brutally pasted:

    inside Oro/Bundle/UserBundle/Entity/User

    you know what? I get 200 and all the test pass!!!

    so this is the only error – for some reason however I cannot get my head around it

    it is as if the extendEntity properties and methods were not present – I tried and the class does get loaded but there is something fishy…


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33738

    jakabadambalazs
    Participant

    I am on oro/platform 1.6.0 (composer installed)

    in CLI I have Zend OPcache disabled:
    Opcode Caching => Disabled
    Optimization => Disabled
    Startup Failed => Opcode Caching is disabled for CLI

    Did fresh install on newly created db. No cookies! 401!
    same error


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33737

    jakabadambalazs
    Participant

    i have also tested that “app/cache/test/oro_entities/Extend/Entity/EX_OroUserBundle_User.php” gets loaded and it does and it has:

    which seems correct to me

    I am not sure why the corresponding does not mention the avatar property in “app/cache/test/oro_entities/Extend/Entity/EX_OroUserBundle_User.orm.yml”


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33735

    jakabadambalazs
    Participant

    ok, here we go:

    at this point I should be all set, however if I do:

    I get:

    I don’t think it has anything to do with my problem but it is strange these were not created during install.

    for now I do not force it.

    so, let’s phpunit…..(fingers crossed)…

    NOPE: here is backtrace:


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33733

    jakabadambalazs
    Participant

    yes, odd indeed! Thanks! I found the entry point giving me 401. It is BasicAuthenticationEntryPoint.

    and I have a backtrace:

    There was 1 error:

    it is complaining about Oro\Bundle\UserBundle\Entity\User::$avatar
    does this make sense to you?


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

    in reply to: Functional Tests 401 #33731

    jakabadambalazs
    Participant

    hmmm, i do NOT reach UnauthorizedHttpException class –

    I inserted in the constructor:

    but it never gets called!

    …i’ll try to read some sf2 documentations…


    oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)

Viewing 15 replies - 31 through 45 (of 99 total)

You will be redirected to [title]. Would you like to continue?

Yes No