title: how to unit-test a php method_exists()
body: <p>having this code</p>
  
  <pre><code>&lt;?php
  public function trueOrFalse($handler) {
   if (method_exists($handler, 'isTrueOrFalse')) {
    $result= $handler::isTrueOrFalse;
    return $result;
   } else {
    return FALSE;
   }
  }
  </code></pre>
  
  <p>how would you unit-test it? is there a chance to mock a <code>$handler</code>? obviously i would need some kind of</p>
  
  <pre><code>&lt;?php
  $handlerMock= \Mockery::mock(MyClass::class);
  $handlerMock-&gt;shouldReceive('method_exists')-&gt;andReturn(TRUE);
  </code></pre>
  
  <p>but it cannot be done</p>