DEV Community

Discussion on: Testing with Postman (From the office)

Collapse
 
anastasionico profile image
anastasionico

Thanks for the comment, how come you haven't written PHPUnit tests?

Collapse
 
marcusatlocalhost profile image
Marcus

The usually reasons: nobody asked for tests (only when I contributed to open source projects :D), not taking the time to get into it and understand it etc.
But I always keep it in mind and will get there one day.

Thread Thread
 
anastasionico profile image
anastasionico

I understand, also the docs is not easy at all.
I might do a series of tutorial of if you and other readers are interested.
What whould you like to know in particular?

Thread Thread
 
marcusatlocalhost profile image
Marcus

Here is something I have a hard time wrapping my head around and it's more related to contributing to open source (incl. writing tests ;-))

What is the easiest way to contribute to an open source project, while having it implemented in a current project?

Let's say I'm using guzzle and some cache middleware in a project. And I'm able to provide another cache provider that others might find useful, or update one.
What I want is turning the library that I improved into a forked repo, so I can send a merge request, and all that while staying inside my current project.
Most likely a test needs to be written for the enhancement and I want to do all of that right in the project where I use the code. Does that make sense?

I don't want to context switch as less as possible.
Any idea?

Thread Thread
 
anastasionico profile image
anastasionico

What you would do in that case is to clone the repo guzzle/guzzle and edit it rather than your repo.

Add the code for your feature + tests and send a pull request to their team.
Here are some examples:
#3057
#2525
#2500