Usually you'd be injecting the mock into something, right now it's just sitting around in your test method and not being used. If you're using Laravel, you either need to be replacing the actual Entity\Classes\Entity
in the IoC container with the mock, or if Entity\Classes\Entity::index
is a static method, you need to use alias mocking, but I wouldn't recommend that, it's a can of worms.
Edit:
Search for "alias:" on this page https://github.com/padraic/mockery/blob/master/docs/05-QUICK-REFERENCE.md for alias mocking. Note you will probably want to run tests that use alias mocking with phpunit's process isolation.