Commit 3afd3876 by Scott

Reformat base tests

parent 50f97a05
......@@ -4,50 +4,28 @@ class BaseTest extends PHPUnit_Framework_TestCase
{
public function test__qa_js()
{
$test = qa_js('test');
$this->assertSame("'test'", $test);
$this->assertSame("'test'", qa_js('test'));
$this->assertSame("'test'", qa_js('test', true));
$test = qa_js('test', true);
$this->assertSame("'test'", $test);
$this->assertSame(123, qa_js(123));
$this->assertSame("'123'", qa_js(123, true));
$test = qa_js(123);
$this->assertSame(123, $test);
$test = qa_js(123, true);
$this->assertSame("'123'", $test);
$test = qa_js(true);
$this->assertSame('true', $test);
$test = qa_js(true, true);
$this->assertSame("'true'", $test);
$this->assertSame('true', qa_js(true));
$this->assertSame("'true'", qa_js(true, true));
}
public function test__convert_to_bytes()
{
$test = convert_to_bytes('k', 100);
$this->assertSame(102400, $test);
$test = convert_to_bytes('m', 100);
$this->assertSame(104857600, $test);
$test = convert_to_bytes('g', 100);
$this->assertSame(107374182400, $test);
$test = convert_to_bytes('K', 100);
$this->assertSame(102400, $test);
$test = convert_to_bytes('M', 100);
$this->assertSame(104857600, $test);
$test = convert_to_bytes('G', 100);
$this->assertSame(107374182400, $test);
$this->assertSame( 102400, convert_to_bytes('k', 100));
$this->assertSame( 104857600, convert_to_bytes('m', 100));
$this->assertSame(107374182400, convert_to_bytes('g', 100));
$test = convert_to_bytes('', 100);
$this->assertSame(100, $test);
$this->assertSame( 102400, convert_to_bytes('K', 100));
$this->assertSame( 104857600, convert_to_bytes('M', 100));
$this->assertSame(107374182400, convert_to_bytes('G', 100));
$test = convert_to_bytes('k', 1024);
$this->assertSame(1048576, $test);
$this->assertSame( 100, convert_to_bytes('', 100));
$this->assertSame( 1048576, convert_to_bytes('k', 1024));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment