What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
spryker, please stop using statics and global constants. It's a nightmare to unit test. And please d
spryker, please stop using statics and global constants. It's a nightmare to unit test. And please depracate/remove LoggerTrait and ErrorLogger, as it is braking https://en.wikipedia.org/wiki/Dependency_inversion_principle.
Comments
-
What do you mean statics and global const?
any example to get your question?
0 -
Search in vendor for any global constant like:
APPLICATION_ROOT_DIR APPLICATION_ENV ...
Search in vendor for
ErrorLogger::
orConfig::
orStore::
and then, please unit test these classes in reasonable way. Good luck!0 -
Why do you need to unit test ErrorLogger? For Config you can set any config value for test with \SprykerTest\Shared\Testify\HelperConfigHelper.
0 -
I don't need unit test error logger. But because you guys love to use statics, it is hard to test if logger is logging something.
0 -
If I understand you correctly you call a method and then you want to see if something ended up in the log?
0 -
No. If I inject logger interface mock, and I put expectation on it, I expect it is called. Sounds like you never unit tested...
0 -
And you are super judgmental about people that you never meet or worked with.
0 -
Yeah, not the first time "Spryker" acting as developing gods.
0 -
I pointed out this issue to one of your senior architects more than year ago, now it is getting worse and worse.
0 -
But again, you guys are the "gods", and I, as a user am stuck with this.
0 -
As far as I can see from this thread you have exactly 3 examples
0 -
and none are affecting the actual logic, but I might be wrong
0 -
Ok, test this method, that you expect exception logged https://sprykercommunity.slack.com/archives/CKJRJM5FG/p1600695919008200
0 -
who is
you
? I am seeing this code for the first time π0 -
Whatever...
0 -
This example is not the best one for sure and I would not write it like this.
0 -
I don't care about your thoughts.
0 -
And spryker is full of examples like that.
0 -
I have a stupid question, why are you testing Spryker code? Shouldn' you test your logic that you wrote?
0 -
I am not testing spryker code. I am extending spryker code which is depending on that method. And I want to know that I didn't brake original behavior.
Stop asking stupid questions, please.
0 -
This is like testing if libraries work. But maybe I am missing a point of testing. If there is a bug feel free to report it.
0 -
You are the bug
0 -
Stop commenting, please. Unless you have valuable input.
0 -
@UNBSW8S8K your opinion is noted, thank you. And while we appreciate your feedback (we really do, you make our product better), please take a step back and evaluate whether you approach here is yielding the results you are after
0 -
@tom.lehner please ask people to stop giving input if it is useless.
0 -
Thanks for noting this serious issue in whole spryker codebase.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random