示例#1
0
 public function testCorrectMethodIsDetected()
 {
     Apricot::reset();
     Apricot::setEnvironment('test');
     Apricot::when('/', function () {
         echo Apricot::method();
     });
     $this->assertTrue('GET' === Apricot::browse('/'));
     $this->assertTrue('POST' === Apricot::browse('/', 'POST'));
 }