Giter Club home page Giter Club logo

Comments (11)

mikehaertl avatar mikehaertl commented on May 28, 2024 1

Done!

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 28, 2024

Yes, it's because of this here:
https://github.com/codemix/yii2-localeurls/blob/master/UrlManager.php#L425

It was the only way to test the redirects in the test cases. Hmm. Not sure yet, how to fix this.

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 28, 2024

@schmunk42 Actually I think, you should fix your test cases, so that they don't trigger any redirect from this extension. Your test cases would probably not work correctly anyway if there's a redirect.

from yii2-localeurls.

schmunk42 avatar schmunk42 commented on May 28, 2024

Hmmm, we explicitly test redirects in our acceptance test cases, since this is one of the parts we often have problems with (eg. wrong SEO indexing, empty pages for en_us while en is fine, etc...).

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 28, 2024

@schmunk42 We already have very extensive tests in the extension itself. We test for all kinds of different scenarios so I don't think you need to test for this again in your app. If you find, that a test is missing I'm happy to include it here.

So can we close this?

from yii2-localeurls.

schmunk42 avatar schmunk42 commented on May 28, 2024

Yes, closed. Thank you.

from yii2-localeurls.

schmunk42 avatar schmunk42 commented on May 28, 2024

Can we get something like

if (getenv('LOCALEURLS_TEST')) {

instead of using YII_ENV_TEST? Just pass this by setting a variable or constant in the test config.

Since this component is so deeply integrated into the application lifecycle, it's impossible to work around this issue in acceptance tests.

I'd be ready for a PR about this.

🙇

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 28, 2024

Ok, should not hurt. I've committed a change. Does this solve it for you?

from yii2-localeurls.

schmunk42 avatar schmunk42 commented on May 28, 2024

Perfect, thank you! A new release would be the last thing ;)

from yii2-localeurls.

schmunk42 avatar schmunk42 commented on May 28, 2024

Ooops, undefined variable, see PR.

from yii2-localeurls.

mikehaertl avatar mikehaertl commented on May 28, 2024

Ouch, ok. But no PR so far...?

from yii2-localeurls.

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.