Permalink
Browse files

git ignore modified

  • Loading branch information...
kaviththiranga committed Dec 14, 2012
1 parent 5a48ab5 commit cb555dc378e0433878347647229999bfc227e66b
Showing with 35 additions and 1 deletion.
  1. +0 −1 .gitignore
  2. +35 −0 tests/suites/legacy/request/JRequestGetMethodTest.php
View
@@ -1,4 +1,3 @@
index.php
includes/
.idea/
-tests/suites/legacy/request/JRequestGetMethodTest.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * @package Joomla.UnitTest
+ * @subpackage Environment
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+/**
+ * A unit test class for JRequest
+ */
+class JRequestTest_GetMethod extends PHPUnit_Framework_TestCase
+{
+
+ /**
+ * Clear the cache
+ */
+ function setUp() {
+ // Make sure the request hash is clean.
+ $GLOBALS['_JREQUEST'] = array();
+ }
+
+ /**
+ * @covers JRequest::getMethod
+ */
+ function testGetMethod()
+ {
+ $_SERVER['REQUEST_METHOD'] = 'post';
+ $this -> assertEquals('POST', JRequest::getMethod());
+ $_SERVER['REQUEST_METHOD'] = 'get';
+ $this -> assertEquals('GET', JRequest::getMethod());
+ }
+
+}

0 comments on commit cb555dc

Please sign in to comment.