-1

Is there a way?

class AAA extends BBB {
    public function ccc()
    {
        parent::ccc();
    }
}

I want to check parent ccc method 1 time called

dbwhddn10
  • 103
  • 2
  • 7
  • possible duplicate of [Testing a class that calls parent::function?](http://stackoverflow.com/questions/17246594/testing-a-class-that-calls-parentfunction) – Schleis Jan 30 '15 at 15:09

1 Answers1

1

Static calls can't be mocked and are usually a bad smell.

http://misko.hevery.com/2008/12/15/static-methods-are-death-to-testability/

That said, Mockery does have some wizzardry to allow you to test them:

http://docs.mockery.io/en/latest/reference/public_static_properties.html

But you really shouldn't be using static methods.

Edson Medina
  • 9,862
  • 3
  • 40
  • 51