Skip to content

Coding Thoughts

Personal Blog of Alexandros Gougousis

Main Navigation
  • Home
  • About me
  • Favorite Books
  • Contact me

Tag: PHPUnit

Mocking static methods with Mockery

Posted on September 9, 2017July 17, 2018 By Gougousis Alexandros

Sometimes we need to test a method from class A that contain static method calls to another class B. Static calls are always a pain for testing and the discussion about the necessity of static methods or variables can be long. So, let’s concentrate on how can we build such tests. We will use Mockery….

0
Pingraphy powered by WordPress
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok