Giter Club home page Giter Club logo

Comments (9)

johannesschobel avatar johannesschobel commented on June 18, 2024

As far as i can understand from your description, this is an issue with your configuration and not apiato itself, right?

from core.

Nesh83 avatar Nesh83 commented on June 18, 2024

Issue is manifested in my configuration, but it is in apiato because testing needs to work on different configurations.

from core.

johannesschobel avatar johannesschobel commented on June 18, 2024

would it help to simply adjust the phpunit.xml configuration file in your own project?

from core.

Nesh83 avatar Nesh83 commented on June 18, 2024

@johannesschobel I could try. Do You have any suggestion how?

from core.

johannesschobel avatar johannesschobel commented on June 18, 2024

you can add new (or overwrite existing) env values in the phpunit.xml file. Take a look at the existing file in order to see how this is specified. Maybe this will help / solve your issue?!

Normally, you should define your custom configuration for the test-environment in this file. However, you may want to check out PHPUnit itself and see if there may be other possibilities to set specific variables..

from core.

johannesschobel avatar johannesschobel commented on June 18, 2024

any update on this @Nesh83 ?

from core.

Nesh83 avatar Nesh83 commented on June 18, 2024

@johannesschobel Had no luck in making it work by changing an environment.

from core.

johannesschobel avatar johannesschobel commented on June 18, 2024

then, how can we address this issue without breaking something? any ideas? lets discuss here

from core.

jjag3r avatar jjag3r commented on June 18, 2024

I have the same problem. When I dd() those variables I get this:

$loadersDirectory = str_replace(getcwd(), '', __DIR__);
dump(getcwd());
dump(__DIR__);
dump($loadersDirectory);
dd($loadersDirectory);

"/Users/jurejager/Code/api.webshop/app/Containers/Address/UI/API/Tests/Functional"
"/Users/jurejager/Code/api.webshop/vendor/apiato/core/Loaders"
"/Users/jurejager/Code/api.webshop/vendor/apiato/core/Loaders"
"/Users/jurejager/Code/api.webshop/vendor/apiato/core/Loaders"

getcwd() is not returning correct string when testing.

Like @Nesh83 said, I have changed from:
$newFactoriesPath = $loadersDirectory . '/FactoryMixer';
to
$newFactoriesPath = str_replace_first(base_path(), '', $loadersDirectory) . '/FactoryMixer';
and now it works.

How can I fix this by changing phpunit.xml?

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.