title: PHPUnit-testing with anonymous functions
body: <p>Say I use a framework like Slim (PHP) and I have this pretty modern code structure:</p>
  
  <pre><code>$app-&gt;post("/", function($request, $response) {
  
      // define the post actions here
  
  });
  </code></pre>
  
  <p>I could put the anonymous function into a separete class, but is there a way to write a test without loosing this code structure?</p>
  
  <p>Thank you.</p>