@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class HtmlTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class HtmlTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class EmailTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class EmailTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class CookieTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class CookieTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class StringHashTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class StringHashTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class PDFTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class PDFTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class AssetsTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class AssetsTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -2,12 +2,12 @@ discard block |
||
| 2 | 2 | use PHPUnit\Framework\TestCase; |
| 3 | 3 | class FormValidationTest extends TestCase |
| 4 | 4 | { |
| 5 | - public static function setUpBeforeClass() |
|
| 5 | + public static function setUpBeforeClass() |
|
| 6 | 6 | { |
| 7 | 7 | |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | - public static function tearDownAfterClass() |
|
| 10 | + public static function tearDownAfterClass() |
|
| 11 | 11 | { |
| 12 | 12 | |
| 13 | 13 | } |
@@ -27,109 +27,109 @@ discard block |
||
| 27 | 27 | // tests |
| 28 | 28 | public function testValidationDataIsEmpty() |
| 29 | 29 | { |
| 30 | - $fv = new FormValidation(); |
|
| 31 | - $this->assertEmpty($fv->getData()); |
|
| 30 | + $fv = new FormValidation(); |
|
| 31 | + $this->assertEmpty($fv->getData()); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - public function testValidationDataIsNotEmpty() |
|
| 34 | + public function testValidationDataIsNotEmpty() |
|
| 35 | 35 | { |
| 36 | - $fv = new FormValidation(); |
|
| 37 | - $fv->setData(array('name' => 'mike')); |
|
| 38 | - $this->assertNotEmpty($fv->getData()); |
|
| 39 | - $this->assertArrayHasKey('name', $fv->getData()); |
|
| 36 | + $fv = new FormValidation(); |
|
| 37 | + $fv->setData(array('name' => 'mike')); |
|
| 38 | + $this->assertNotEmpty($fv->getData()); |
|
| 39 | + $this->assertArrayHasKey('name', $fv->getData()); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - public function testCannotDoValidation() |
|
| 42 | + public function testCannotDoValidation() |
|
| 43 | 43 | { |
| 44 | - $fv = new FormValidation(); |
|
| 45 | - $this->assertFalse($fv->canDoValidation()); |
|
| 44 | + $fv = new FormValidation(); |
|
| 45 | + $this->assertFalse($fv->canDoValidation()); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - public function testSettingErrorDelimiter() |
|
| 48 | + public function testSettingErrorDelimiter() |
|
| 49 | 49 | { |
| 50 | - $fv = new FormValidation(); |
|
| 51 | - $fv->setErrorDelimiter('<a>', '</b>'); |
|
| 52 | - $this->assertContains('<a>', $fv->getErrorDelimiter()); |
|
| 53 | - $this->assertContains('</b>', $fv->getErrorDelimiter()); |
|
| 50 | + $fv = new FormValidation(); |
|
| 51 | + $fv->setErrorDelimiter('<a>', '</b>'); |
|
| 52 | + $this->assertContains('<a>', $fv->getErrorDelimiter()); |
|
| 53 | + $this->assertContains('</b>', $fv->getErrorDelimiter()); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - public function testSettingErrorsDelimiter() |
|
| 56 | + public function testSettingErrorsDelimiter() |
|
| 57 | 57 | { |
| 58 | - $fv = new FormValidation(); |
|
| 59 | - $fv->setErrorsDelimiter('<foo>', '</bar>'); |
|
| 60 | - $this->assertContains('<foo>', $fv->getErrorsDelimiter()); |
|
| 61 | - $this->assertContains('</bar>', $fv->getErrorsDelimiter()); |
|
| 58 | + $fv = new FormValidation(); |
|
| 59 | + $fv->setErrorsDelimiter('<foo>', '</bar>'); |
|
| 60 | + $this->assertContains('<foo>', $fv->getErrorsDelimiter()); |
|
| 61 | + $this->assertContains('</bar>', $fv->getErrorsDelimiter()); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - public function testSettingErrorMessageOverride() |
|
| 64 | + public function testSettingErrorMessageOverride() |
|
| 65 | 65 | { |
| 66 | 66 | |
| 67 | - //field specific message for the rule |
|
| 68 | - $fv = new FormValidation(); |
|
| 69 | - $fv->setData(array('foo' => '')); |
|
| 70 | - $fv->setRule('foo', 'bar', 'required'); |
|
| 71 | - $fv->setMessage('required', 'foo', 'foo required message error'); |
|
| 67 | + //field specific message for the rule |
|
| 68 | + $fv = new FormValidation(); |
|
| 69 | + $fv->setData(array('foo' => '')); |
|
| 70 | + $fv->setRule('foo', 'bar', 'required'); |
|
| 71 | + $fv->setMessage('required', 'foo', 'foo required message error'); |
|
| 72 | 72 | |
| 73 | - $this->assertFalse($fv->run()); |
|
| 74 | - $this->assertContains('foo required message error', $fv->returnErrors()); |
|
| 73 | + $this->assertFalse($fv->run()); |
|
| 74 | + $this->assertContains('foo required message error', $fv->returnErrors()); |
|
| 75 | 75 | |
| 76 | - //global message for the rule |
|
| 77 | - $fv = new FormValidation(); |
|
| 78 | - $fv->setData(array('foo' => '', 'bar' => null)); |
|
| 79 | - $fv->setRule('foo', 'bar', 'required'); |
|
| 80 | - $fv->setRule('bar', 'foo', 'required'); |
|
| 81 | - $fv->setMessage('required', 'global required message error'); |
|
| 76 | + //global message for the rule |
|
| 77 | + $fv = new FormValidation(); |
|
| 78 | + $fv->setData(array('foo' => '', 'bar' => null)); |
|
| 79 | + $fv->setRule('foo', 'bar', 'required'); |
|
| 80 | + $fv->setRule('bar', 'foo', 'required'); |
|
| 81 | + $fv->setMessage('required', 'global required message error'); |
|
| 82 | 82 | |
| 83 | - $this->assertFalse($fv->run()); |
|
| 84 | - $this->assertContains('global required message error', $fv->returnErrors()); |
|
| 83 | + $this->assertFalse($fv->run()); |
|
| 84 | + $this->assertContains('global required message error', $fv->returnErrors()); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - public function testSettingCustomErrorMessage() |
|
| 87 | + public function testSettingCustomErrorMessage() |
|
| 88 | 88 | { |
| 89 | 89 | |
| 90 | - $fv = new FormValidation(); |
|
| 91 | - $fv->setData(array('foo' => '')); |
|
| 92 | - $fv->setRule('foo', 'bar', 'required'); |
|
| 93 | - $fv->setCustomError('foo', 'custom foo message error'); |
|
| 90 | + $fv = new FormValidation(); |
|
| 91 | + $fv->setData(array('foo' => '')); |
|
| 92 | + $fv->setRule('foo', 'bar', 'required'); |
|
| 93 | + $fv->setCustomError('foo', 'custom foo message error'); |
|
| 94 | 94 | |
| 95 | - $this->assertFalse($fv->run()); |
|
| 96 | - $this->assertContains('custom foo message error', $fv->returnErrors()); |
|
| 95 | + $this->assertFalse($fv->run()); |
|
| 96 | + $this->assertContains('custom foo message error', $fv->returnErrors()); |
|
| 97 | 97 | |
| 98 | - //with label in the message |
|
| 99 | - $fv = new FormValidation(); |
|
| 100 | - $fv->setData(array('foo' => '')); |
|
| 101 | - $fv->setRule('foo', 'bar', 'required'); |
|
| 102 | - $fv->setCustomError('foo', 'custom "%1" message error'); |
|
| 98 | + //with label in the message |
|
| 99 | + $fv = new FormValidation(); |
|
| 100 | + $fv->setData(array('foo' => '')); |
|
| 101 | + $fv->setRule('foo', 'bar', 'required'); |
|
| 102 | + $fv->setCustomError('foo', 'custom "%1" message error'); |
|
| 103 | 103 | |
| 104 | - $this->assertFalse($fv->run()); |
|
| 105 | - $this->assertContains('custom "bar" message error', $fv->returnErrors()); |
|
| 104 | + $this->assertFalse($fv->run()); |
|
| 105 | + $this->assertContains('custom "bar" message error', $fv->returnErrors()); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - public function testReturnErrorsArray() |
|
| 108 | + public function testReturnErrorsArray() |
|
| 109 | 109 | { |
| 110 | - $fv = new FormValidation(); |
|
| 111 | - $fv->setRule('name', 'name', 'required'); |
|
| 112 | - $fv->setData(array('name' => '')); |
|
| 113 | - $this->assertFalse($fv->run()); |
|
| 114 | - $this->assertNotEmpty($fv->returnErrors()); |
|
| 110 | + $fv = new FormValidation(); |
|
| 111 | + $fv->setRule('name', 'name', 'required'); |
|
| 112 | + $fv->setData(array('name' => '')); |
|
| 113 | + $this->assertFalse($fv->run()); |
|
| 114 | + $this->assertNotEmpty($fv->returnErrors()); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | |
| 118 | - public function testRequiredRule() |
|
| 118 | + public function testRequiredRule() |
|
| 119 | 119 | { |
| 120 | - $fv = new FormValidation(); |
|
| 121 | - $fv->setRule('name', 'name', 'required'); |
|
| 122 | - $fv->setData(array('name' => '')); |
|
| 123 | - $this->assertFalse($fv->run()); |
|
| 120 | + $fv = new FormValidation(); |
|
| 121 | + $fv->setRule('name', 'name', 'required'); |
|
| 122 | + $fv->setData(array('name' => '')); |
|
| 123 | + $this->assertFalse($fv->run()); |
|
| 124 | 124 | |
| 125 | - $fv = new FormValidation(); |
|
| 126 | - $fv->setRule('name', 'name', 'required'); |
|
| 127 | - $fv->setData(array('name' => null)); |
|
| 128 | - $this->assertFalse($fv->run()); |
|
| 125 | + $fv = new FormValidation(); |
|
| 126 | + $fv->setRule('name', 'name', 'required'); |
|
| 127 | + $fv->setData(array('name' => null)); |
|
| 128 | + $this->assertFalse($fv->run()); |
|
| 129 | 129 | |
| 130 | - $fv = new FormValidation(); |
|
| 131 | - $fv->setRule('name', 'name', 'required'); |
|
| 132 | - $fv->setData(array('name' => 'tony')); |
|
| 133 | - $this->assertTrue($fv->run()); |
|
| 130 | + $fv = new FormValidation(); |
|
| 131 | + $fv->setRule('name', 'name', 'required'); |
|
| 132 | + $fv->setData(array('name' => 'tony')); |
|
| 133 | + $this->assertTrue($fv->run()); |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | \ No newline at end of file |
@@ -1,31 +1,31 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class PaginationTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class PaginationTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function testNotYet() |
|
| 27 | - { |
|
| 28 | - $this->markTestSkipped(); |
|
| 29 | - } |
|
| 26 | + public function testNotYet() |
|
| 27 | + { |
|
| 28 | + $this->markTestSkipped(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - } |
|
| 32 | 31 | \ No newline at end of file |
| 32 | + } |
|
| 33 | 33 | \ No newline at end of file |
@@ -1,50 +1,50 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | - use PHPUnit\Framework\TestCase; |
|
| 3 | + use PHPUnit\Framework\TestCase; |
|
| 4 | 4 | |
| 5 | - class CommonTest extends TestCase |
|
| 6 | - { |
|
| 5 | + class CommonTest extends TestCase |
|
| 6 | + { |
|
| 7 | 7 | |
| 8 | - public static function setUpBeforeClass() |
|
| 9 | - { |
|
| 8 | + public static function setUpBeforeClass() |
|
| 9 | + { |
|
| 10 | 10 | |
| 11 | - } |
|
| 11 | + } |
|
| 12 | 12 | |
| 13 | - public static function tearDownAfterClass() |
|
| 14 | - { |
|
| 13 | + public static function tearDownAfterClass() |
|
| 14 | + { |
|
| 15 | 15 | |
| 16 | - } |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - protected function setUp() |
|
| 19 | - { |
|
| 20 | - } |
|
| 18 | + protected function setUp() |
|
| 19 | + { |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - protected function tearDown() |
|
| 23 | - { |
|
| 24 | - } |
|
| 22 | + protected function tearDown() |
|
| 23 | + { |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | 26 | |
| 27 | - public function testFunctionGetConfigKeyNotExist(){ |
|
| 28 | - $key = 'foo'; |
|
| 29 | - $cfg = get_config($key); |
|
| 30 | - $this->assertNull($cfg); |
|
| 31 | - } |
|
| 27 | + public function testFunctionGetConfigKeyNotExist(){ |
|
| 28 | + $key = 'foo'; |
|
| 29 | + $cfg = get_config($key); |
|
| 30 | + $this->assertNull($cfg); |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - public function testFunctionGetConfigKeyNotExistUsingDefaultValue(){ |
|
| 34 | - $key = 'foo'; |
|
| 35 | - $expected = 'bar'; |
|
| 36 | - $cfg = get_config($key, $expected); |
|
| 37 | - $this->assertEquals($cfg, $expected); |
|
| 38 | - } |
|
| 33 | + public function testFunctionGetConfigKeyNotExistUsingDefaultValue(){ |
|
| 34 | + $key = 'foo'; |
|
| 35 | + $expected = 'bar'; |
|
| 36 | + $cfg = get_config($key, $expected); |
|
| 37 | + $this->assertEquals($cfg, $expected); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - public function testFunctionGetConfigAfterSet(){ |
|
| 41 | - $key = 'foo'; |
|
| 42 | - $expected = 'bar'; |
|
| 43 | - $c = new Config(); |
|
| 44 | - $c->init(); |
|
| 45 | - $c->set($key, $expected); |
|
| 46 | - $cfg = get_config($key); |
|
| 47 | - $this->assertEquals($cfg, $expected); |
|
| 48 | - } |
|
| 40 | + public function testFunctionGetConfigAfterSet(){ |
|
| 41 | + $key = 'foo'; |
|
| 42 | + $expected = 'bar'; |
|
| 43 | + $c = new Config(); |
|
| 44 | + $c->init(); |
|
| 45 | + $c->set($key, $expected); |
|
| 46 | + $cfg = get_config($key); |
|
| 47 | + $this->assertEquals($cfg, $expected); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - } |
|
| 51 | 50 | \ No newline at end of file |
| 51 | + } |
|
| 52 | 52 | \ No newline at end of file |