Mocking Fluent Laravel Facade Chains

Laravel offers several methods for testing Facades including fakes, the ShouldReceive() method, and base Mockery functions. This article breaks down a few approaches for mocking fluent facade chains.

Continue Reading
Written By Jesse Schutt
Posted on

Refactoring Techniques: Extract Method

The Extract Method is probably a technique you use on a daily basis; if not, it should be. It really isn’t any more complicated than the title would suggest. It’s looking through a method and determining what lines of code could easily be grouped together into another function.

Continue Reading
Written By Jesse Schutt
Posted on

Testing 101: Escape Testing Paralysis!

Learning to write good tests is critical to being a programmer. We write tests to make sure the work is solid and doing what it's supposed to, while exerting as little effort as possible (we're not lazy; we're effective...). When I understood that, I determined that I was going to get great at testing. So naturally I started internet research: "Dear Google, show me 'best code testing practices.'"

Continue Reading
Written By Jesse Schutt
Posted on