mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
Remove trailing whitespace in all unit tests
This commit is contained in:
parent
37b0d3a1e6
commit
3b77781d15
40 changed files with 840 additions and 840 deletions
|
|
@ -62,11 +62,11 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals(Context::getBodyClass(), ' class="red green blue"');
|
||||
Context::addBodyClass('yellow');
|
||||
$this->assertEquals(Context::getBodyClassList(), ['red', 'green', 'blue', 'yellow']);
|
||||
|
||||
|
||||
// remove class manually
|
||||
Context::removeBodyClass('yellow');
|
||||
$this->assertEquals(Context::getBodyClassList(), ['red', 'green', 'blue']);
|
||||
|
||||
|
||||
// remove duplicated class
|
||||
Context::addBodyClass('red');
|
||||
$this->assertEquals(Context::getBodyClass(), ' class="red green blue"');
|
||||
|
|
@ -84,7 +84,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestArguments();
|
||||
$this->assertEquals('GET', Context::getRequestMethod());
|
||||
$this->assertEquals('bar', Context::getRequestVars()->foo);
|
||||
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_GET = array('foo' => 'barrr', 'xe_js_callback' => 'callback12345');
|
||||
$_POST = array();
|
||||
|
|
@ -95,7 +95,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestArguments();
|
||||
$this->assertEquals('JS_CALLBACK', Context::getRequestMethod());
|
||||
$this->assertEquals('barrr', Context::getRequestVars()->foo);
|
||||
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$_GET = $_REQUEST = array('foo' => 'bazz'); // Request method is POST but actual values are given as GET
|
||||
$_POST = array();
|
||||
|
|
@ -106,7 +106,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals('POST', Context::getRequestMethod());
|
||||
$this->assertNull(Context::getRequestVars()->foo ?? null);
|
||||
$this->assertNull(Context::get('foo')); // This is different from XE behavior
|
||||
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$_GET = array();
|
||||
$_POST = $_REQUEST = array('foo' => 'rhymixtest');
|
||||
|
|
@ -116,7 +116,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestArguments();
|
||||
$this->assertEquals('POST', Context::getRequestMethod());
|
||||
$this->assertEquals('rhymixtest', Context::getRequestVars()->foo);
|
||||
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$_GET = $_POST = $_REQUEST = array();
|
||||
$GLOBALS['HTTP_RAW_POST_DATA'] = '<?xml version="1.0" encoding="utf-8" ?><methodCall><params><foo>TestRhymix</foo></params></methodCall>';
|
||||
|
|
@ -126,7 +126,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestArguments();
|
||||
$this->assertEquals('XMLRPC', Context::getRequestMethod());
|
||||
$this->assertEquals('TestRhymix', Context::getRequestVars()->foo);
|
||||
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$_GET = $_POST = $_REQUEST = array();
|
||||
$GLOBALS['HTTP_RAW_POST_DATA'] = 'foo=JSON_TEST'; // Not actual JSON
|
||||
|
|
@ -137,7 +137,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestArguments();
|
||||
$this->assertEquals('JSON', Context::getRequestMethod());
|
||||
$this->assertEquals('JSON_TEST', Context::getRequestVars()->foo);
|
||||
|
||||
|
||||
Context::setRequestMethod('POST');
|
||||
$_GET = $_POST = $_REQUEST = array();
|
||||
unset($GLOBALS['HTTP_RAW_POST_DATA']);
|
||||
|
|
@ -147,7 +147,7 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
Context::setRequestMethod();
|
||||
Context::setRequestArguments();
|
||||
$this->assertEquals('POST', Context::getRequestMethod());
|
||||
|
||||
|
||||
Context::setRequestMethod('POST');
|
||||
$_GET = array();
|
||||
$_POST = $_REQUEST = array('foo' => 'legacy', '_rx_ajax_compat' => 'XMLRPC');
|
||||
|
|
@ -160,20 +160,20 @@ class ContextTest extends \Codeception\TestCase\Test
|
|||
$this->assertEquals('XMLRPC', Context::getRequestMethod());
|
||||
$this->assertEquals('legacy', Context::getRequestVars()->foo);
|
||||
}
|
||||
|
||||
|
||||
public function testSetResponseMethod()
|
||||
{
|
||||
$this->assertEquals(Context::getResponseMethod(), 'HTML');
|
||||
|
||||
|
||||
Context::setRequestMethod('JSON');
|
||||
$this->assertEquals(Context::getResponseMethod(), 'JSON');
|
||||
|
||||
Context::setResponseMethod('WRONG_TYPE');
|
||||
$this->assertEquals(Context::getResponseMethod(), 'HTML');
|
||||
|
||||
|
||||
Context::setResponseMethod('XMLRPC');
|
||||
$this->assertEquals(Context::getResponseMethod(), 'XMLRPC');
|
||||
|
||||
|
||||
Context::setResponseMethod('HTML');
|
||||
$this->assertEquals(Context::getResponseMethod(), 'HTML');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue