Пример #1
0
 /**
  * Test that a regex route is matched correctly
  * 
  * @return null
  */
 public function testRegexRouteMatch()
 {
     $_SERVER['REQUEST_URI'] = '/testing123';
     $_SERVER['REQUEST_METHOD'] = 'GET';
     $app = new Shield();
     $app->get('/testing[0-9]+', function () {
         echo 'match /';
     });
     ob_start();
     $app->run();
     $output = ob_get_clean();
     $this->assertEquals('match /', $output);
 }