Jelajahi Sumber

ZF-6162: backport r18336 to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18337 44c647ce-9c0f-0410-b52a-842ac1e357ba
matthew 16 tahun lalu
induk
melakukan
3f2a9091da
1 mengubah file dengan 8 tambahan dan 5 penghapusan
  1. 8 5
      tests/Zend/Controller/Request/HttpTestCaseTest.php

+ 8 - 5
tests/Zend/Controller/Request/HttpTestCaseTest.php

@@ -286,18 +286,21 @@ class Zend_Controller_Request_HttpTestCaseTest extends PHPUnit_Framework_TestCas
         $this->assertTrue(empty($test));
     }
 
-    public function testRequestMethodShouldBeNullByDefault()
+    /**
+     * @group ZF-6162
+     */
+    public function testRequestMethodShouldBeGetByDefault()
     {
-        $this->assertNull($this->request->getMethod());
+        $this->assertEquals('GET', $this->request->getMethod());
     }
 
     public function testShouldAllowSpecifyingRequestMethod()
     {
-        $this->testRequestMethodShouldBeNullByDefault();
-        $this->request->setMethod('GET');
-        $this->assertTrue($this->request->isGet());
+        $this->testRequestMethodShouldBeGetByDefault();
         $this->request->setMethod('POST');
         $this->assertTrue($this->request->isPost());
+        $this->request->setMethod('GET');
+        $this->assertTrue($this->request->isGet());
         $this->request->setMethod('PUT');
         $this->assertTrue($this->request->isPut());
         $this->request->setMethod('OPTIONS');