Completed
Push — scrutinizer ( 84e9d0...6a9613 )
by Fabio
22:48
created
tests/unit/Web/UI/AllTests.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
 
22 22
 class Web_UI_AllTests {
23 23
   public static function main() {
24
-    PHPUnit_TextUI_TestRunner::run(self::suite());
24
+	PHPUnit_TextUI_TestRunner::run(self::suite());
25 25
   }
26 26
 
27 27
   public static function suite() {
28
-    $suite = new PHPUnit_Framework_TestSuite('System.Web.UI');
28
+	$suite = new PHPUnit_Framework_TestSuite('System.Web.UI');
29 29
 
30 30
 	$suite->addTestSuite('TClientScriptManagerTest');
31 31
 	$suite->addTestSuite('TControlAdapterTest');
32
-    $suite->addTestSuite('TControlTest');
32
+	$suite->addTestSuite('TControlTest');
33 33
 	$suite->addTestSuite('TFormTest');
34 34
 	$suite->addTestSuite('TPageTest');
35 35
 	$suite->addTestSuite('TTemplateControlTest');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	$suite->addTestSuite('TPageStatePersisterTest');
42 42
 	$suite->addTestSuite('TSessionPageStatePersisterTest');
43 43
 
44
-    return $suite;
44
+	return $suite;
45 45
   }
46 46
 }
47 47
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-if(!defined('PHPUnit_MAIN_METHOD')) {
4
+if (!defined('PHPUnit_MAIN_METHOD')) {
5 5
   define('PHPUnit_MAIN_METHOD', 'Web_UI_AllTests::main');
6 6
 }
7 7
 
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
   }
46 46
 }
47 47
 
48
-if(PHPUnit_MAIN_METHOD == 'Web_UI_AllTests::main') {
48
+if (PHPUnit_MAIN_METHOD == 'Web_UI_AllTests::main') {
49 49
   Web_UI_AllTests::main();
50 50
 }
Please login to merge, or discard this patch.
tests/unit/Web/THttpUtilityTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 	}
16 16
 
17 17
 	public function testHtmlDecode() {
18
-    	$html = THttpUtility::htmlDecode('&lt;tag key=&quot;value&quot;&gt;');
18
+		$html = THttpUtility::htmlDecode('&lt;tag key=&quot;value&quot;&gt;');
19 19
 		self::assertEquals('<tag key="value">', $html);
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
tests/unit/Web/THttpCookieCollectionTest.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -8,42 +8,42 @@
 block discarded – undo
8 8
 class THttpCookieCollectionTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
   public function testConstruct() {
11
-    $coll=new THttpCookieCollection();
12
-    self::assertInstanceOf('THttpCookieCollection', $coll);
11
+	$coll=new THttpCookieCollection();
12
+	self::assertInstanceOf('THttpCookieCollection', $coll);
13 13
   }
14 14
 
15 15
   public function testInsertAt() {
16
-    $coll=new THttpCookieCollection();
17
-    $coll->insertAt(0, new THttpCookie('name','value'));
18
-    self::assertEquals('value',$coll->itemAt(0)->getValue());
19
-    try {
20
-    	$coll->insertAt(1, "bad parameter");
21
-    	self::fail ('Invalid data type exception not raised');
22
-    } catch (TInvalidDataTypeException $e) {}
16
+	$coll=new THttpCookieCollection();
17
+	$coll->insertAt(0, new THttpCookie('name','value'));
18
+	self::assertEquals('value',$coll->itemAt(0)->getValue());
19
+	try {
20
+		$coll->insertAt(1, "bad parameter");
21
+		self::fail ('Invalid data type exception not raised');
22
+	} catch (TInvalidDataTypeException $e) {}
23 23
   }
24 24
 
25 25
   public function testRemoveAt() {
26
-    $coll=new THttpCookieCollection();
27
-    try {
28
-    	$coll->removeAt(0);
29
-    	self::fail('Invalid Value exception not raised');
30
-    } catch (TInvalidDataValueException $e) {}
31
-
32
-    $coll->insertAt(0, new THttpCookie('name','value'));
33
-    self::assertEquals('value',$coll->removeAt(0)->getValue());
26
+	$coll=new THttpCookieCollection();
27
+	try {
28
+		$coll->removeAt(0);
29
+		self::fail('Invalid Value exception not raised');
30
+	} catch (TInvalidDataValueException $e) {}
31
+
32
+	$coll->insertAt(0, new THttpCookie('name','value'));
33
+	self::assertEquals('value',$coll->removeAt(0)->getValue());
34 34
   }
35 35
 
36 36
   public function testItemAt() {
37
-    $coll=new THttpCookieCollection();
38
-    $coll->insertAt(0, new THttpCookie('name','value'));
39
-    self::assertEquals('value',$coll->itemAt(0)->getValue());
40
-    self::assertEquals('value',$coll->itemAt('name')->getValue());
37
+	$coll=new THttpCookieCollection();
38
+	$coll->insertAt(0, new THttpCookie('name','value'));
39
+	self::assertEquals('value',$coll->itemAt(0)->getValue());
40
+	self::assertEquals('value',$coll->itemAt('name')->getValue());
41 41
   }
42 42
 
43 43
   public function testFindCookieByName() {
44
-    $coll=new THttpCookieCollection();
45
-    $coll->insertAt(0, new THttpCookie('name','value'));
46
-    self::assertEquals ('value', $coll->findCookieByName('name')->getValue());
47
-    self::assertNull ($coll->findCookieByName('invalid'));
44
+	$coll=new THttpCookieCollection();
45
+	$coll->insertAt(0, new THttpCookie('name','value'));
46
+	self::assertEquals ('value', $coll->findCookieByName('name')->getValue());
47
+	self::assertNull ($coll->findCookieByName('invalid'));
48 48
   }
49 49
 }
50 50
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,42 +8,42 @@
 block discarded – undo
8 8
 class THttpCookieCollectionTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
   public function testConstruct() {
11
-    $coll=new THttpCookieCollection();
11
+    $coll = new THttpCookieCollection();
12 12
     self::assertInstanceOf('THttpCookieCollection', $coll);
13 13
   }
14 14
 
15 15
   public function testInsertAt() {
16
-    $coll=new THttpCookieCollection();
17
-    $coll->insertAt(0, new THttpCookie('name','value'));
18
-    self::assertEquals('value',$coll->itemAt(0)->getValue());
16
+    $coll = new THttpCookieCollection();
17
+    $coll->insertAt(0, new THttpCookie('name', 'value'));
18
+    self::assertEquals('value', $coll->itemAt(0)->getValue());
19 19
     try {
20 20
     	$coll->insertAt(1, "bad parameter");
21
-    	self::fail ('Invalid data type exception not raised');
21
+    	self::fail('Invalid data type exception not raised');
22 22
     } catch (TInvalidDataTypeException $e) {}
23 23
   }
24 24
 
25 25
   public function testRemoveAt() {
26
-    $coll=new THttpCookieCollection();
26
+    $coll = new THttpCookieCollection();
27 27
     try {
28 28
     	$coll->removeAt(0);
29 29
     	self::fail('Invalid Value exception not raised');
30 30
     } catch (TInvalidDataValueException $e) {}
31 31
 
32
-    $coll->insertAt(0, new THttpCookie('name','value'));
33
-    self::assertEquals('value',$coll->removeAt(0)->getValue());
32
+    $coll->insertAt(0, new THttpCookie('name', 'value'));
33
+    self::assertEquals('value', $coll->removeAt(0)->getValue());
34 34
   }
35 35
 
36 36
   public function testItemAt() {
37
-    $coll=new THttpCookieCollection();
38
-    $coll->insertAt(0, new THttpCookie('name','value'));
39
-    self::assertEquals('value',$coll->itemAt(0)->getValue());
40
-    self::assertEquals('value',$coll->itemAt('name')->getValue());
37
+    $coll = new THttpCookieCollection();
38
+    $coll->insertAt(0, new THttpCookie('name', 'value'));
39
+    self::assertEquals('value', $coll->itemAt(0)->getValue());
40
+    self::assertEquals('value', $coll->itemAt('name')->getValue());
41 41
   }
42 42
 
43 43
   public function testFindCookieByName() {
44
-    $coll=new THttpCookieCollection();
45
-    $coll->insertAt(0, new THttpCookie('name','value'));
46
-    self::assertEquals ('value', $coll->findCookieByName('name')->getValue());
47
-    self::assertNull ($coll->findCookieByName('invalid'));
44
+    $coll = new THttpCookieCollection();
45
+    $coll->insertAt(0, new THttpCookie('name', 'value'));
46
+    self::assertEquals('value', $coll->findCookieByName('name')->getValue());
47
+    self::assertNull($coll->findCookieByName('invalid'));
48 48
   }
49 49
 }
50 50
\ No newline at end of file
Please login to merge, or discard this patch.
tests/unit/Web/THttpCookieTest.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -8,45 +8,45 @@
 block discarded – undo
8 8
 class THttpCookieTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
   public function testConstruct() {
11
-    $cookie=new THttpCookie('name','value');
12
-    self::assertEquals('name',$cookie->getName());
13
-    self::assertEquals('value',$cookie->getValue());
11
+	$cookie=new THttpCookie('name','value');
12
+	self::assertEquals('name',$cookie->getName());
13
+	self::assertEquals('value',$cookie->getValue());
14 14
   }
15 15
 
16 16
   public function testSetDomain() {
17
-    $cookie=new THttpCookie('name','value');
18
-    $cookie->setDomain('pradoframework.net');
19
-    self::assertEquals('pradoframework.net',$cookie->getdomain());
17
+	$cookie=new THttpCookie('name','value');
18
+	$cookie->setDomain('pradoframework.net');
19
+	self::assertEquals('pradoframework.net',$cookie->getdomain());
20 20
   }
21 21
 
22 22
   public function testSetExpire() {
23
-    $cookie=new THttpCookie('name','value');
24
-    $exp=time()+3600;
25
-    $cookie->setExpire($exp);
26
-    self::assertEquals($exp,$cookie->getExpire());
23
+	$cookie=new THttpCookie('name','value');
24
+	$exp=time()+3600;
25
+	$cookie->setExpire($exp);
26
+	self::assertEquals($exp,$cookie->getExpire());
27 27
   }
28 28
 
29 29
   public function testSetName() {
30
-     $cookie=new THttpCookie('name','value');
31
-     $cookie->setName('newName');
32
-     self::assertEquals('newName', $cookie->getName());
30
+	 $cookie=new THttpCookie('name','value');
31
+	 $cookie->setName('newName');
32
+	 self::assertEquals('newName', $cookie->getName());
33 33
   }
34 34
 
35 35
   public function testSetValue() {
36
-    $cookie=new THttpCookie('name','value');
37
-    $cookie->setValue('newValue');
38
-    self::assertEquals('newValue', $cookie->getValue());
36
+	$cookie=new THttpCookie('name','value');
37
+	$cookie->setValue('newValue');
38
+	self::assertEquals('newValue', $cookie->getValue());
39 39
   }
40 40
 
41 41
   public function testSetPath() {
42
-    $cookie=new THttpCookie('name','value');
43
-    $cookie->setPath('/admin');
44
-    self::assertEquals('/admin', $cookie->getPath());
42
+	$cookie=new THttpCookie('name','value');
43
+	$cookie->setPath('/admin');
44
+	self::assertEquals('/admin', $cookie->getPath());
45 45
   }
46 46
 
47 47
   public function testSetSecure() {
48
-    $cookie=new THttpCookie('name','value');
49
-    $cookie->setSecure(true);
50
-    self::assertTrue($cookie->getSecure());
48
+	$cookie=new THttpCookie('name','value');
49
+	$cookie->setSecure(true);
50
+	self::assertTrue($cookie->getSecure());
51 51
   }
52 52
 }
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,44 +8,44 @@
 block discarded – undo
8 8
 class THttpCookieTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
   public function testConstruct() {
11
-    $cookie=new THttpCookie('name','value');
12
-    self::assertEquals('name',$cookie->getName());
13
-    self::assertEquals('value',$cookie->getValue());
11
+    $cookie = new THttpCookie('name', 'value');
12
+    self::assertEquals('name', $cookie->getName());
13
+    self::assertEquals('value', $cookie->getValue());
14 14
   }
15 15
 
16 16
   public function testSetDomain() {
17
-    $cookie=new THttpCookie('name','value');
17
+    $cookie = new THttpCookie('name', 'value');
18 18
     $cookie->setDomain('pradoframework.net');
19
-    self::assertEquals('pradoframework.net',$cookie->getdomain());
19
+    self::assertEquals('pradoframework.net', $cookie->getdomain());
20 20
   }
21 21
 
22 22
   public function testSetExpire() {
23
-    $cookie=new THttpCookie('name','value');
24
-    $exp=time()+3600;
23
+    $cookie = new THttpCookie('name', 'value');
24
+    $exp = time() + 3600;
25 25
     $cookie->setExpire($exp);
26
-    self::assertEquals($exp,$cookie->getExpire());
26
+    self::assertEquals($exp, $cookie->getExpire());
27 27
   }
28 28
 
29 29
   public function testSetName() {
30
-     $cookie=new THttpCookie('name','value');
30
+     $cookie = new THttpCookie('name', 'value');
31 31
      $cookie->setName('newName');
32 32
      self::assertEquals('newName', $cookie->getName());
33 33
   }
34 34
 
35 35
   public function testSetValue() {
36
-    $cookie=new THttpCookie('name','value');
36
+    $cookie = new THttpCookie('name', 'value');
37 37
     $cookie->setValue('newValue');
38 38
     self::assertEquals('newValue', $cookie->getValue());
39 39
   }
40 40
 
41 41
   public function testSetPath() {
42
-    $cookie=new THttpCookie('name','value');
42
+    $cookie = new THttpCookie('name', 'value');
43 43
     $cookie->setPath('/admin');
44 44
     self::assertEquals('/admin', $cookie->getPath());
45 45
   }
46 46
 
47 47
   public function testSetSecure() {
48
-    $cookie=new THttpCookie('name','value');
48
+    $cookie = new THttpCookie('name', 'value');
49 49
     $cookie->setSecure(true);
50 50
     self::assertTrue($cookie->getSecure());
51 51
   }
Please login to merge, or discard this patch.
tests/unit/Web/AllTests.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
 
19 19
 class Web_AllTests {
20 20
   public static function main() {
21
-    PHPUnit_TextUI_TestRunner::run(self::suite());
21
+	PHPUnit_TextUI_TestRunner::run(self::suite());
22 22
   }
23 23
 
24 24
   public static function suite() {
25
-    $suite = new PHPUnit_Framework_TestSuite('System.Web');
25
+	$suite = new PHPUnit_Framework_TestSuite('System.Web');
26 26
 
27 27
 	$suite->addTestSuite('TAssetManagerTest');
28 28
 	$suite->addTestSuite('TCacheHttpSessionTest');
29 29
 	$suite->addTestSuite('THttpCookieCollectionTest');
30 30
 	$suite->addTestSuite('THttpCookieTest');
31
-    $suite->addTestSuite('THttpRequestTest');
31
+	$suite->addTestSuite('THttpRequestTest');
32 32
 	$suite->addTestSuite('THttpResponseTest');
33 33
 	$suite->addTestSuite('THttpSessionTest');
34 34
 	$suite->addTestSuite('THttpUtilityTest');
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 	$suite->addTest(Web_UI_AllTests::suite());
38 38
 
39
-    return $suite;
39
+	return $suite;
40 40
   }
41 41
 }
42 42
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!defined('PHPUnit_MAIN_METHOD')) {
3
+if (!defined('PHPUnit_MAIN_METHOD')) {
4 4
   define('PHPUnit_MAIN_METHOD', 'Web_AllTests::main');
5 5
 }
6 6
 
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
   }
41 41
 }
42 42
 
43
-if(PHPUnit_MAIN_METHOD == 'Web_AllTests::main') {
43
+if (PHPUnit_MAIN_METHOD == 'Web_AllTests::main') {
44 44
   Web_AllTests::main();
45 45
 }
Please login to merge, or discard this patch.
tests/unit/Web/THttpSessionTest.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -8,130 +8,130 @@
 block discarded – undo
8 8
 class THttpSessionTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
   public function testInit() {
11
-    throw new PHPUnit_Framework_IncompleteTestError();
11
+	throw new PHPUnit_Framework_IncompleteTestError();
12 12
   }
13 13
 
14 14
   public function testOpen() {
15
-    throw new PHPUnit_Framework_IncompleteTestError();
15
+	throw new PHPUnit_Framework_IncompleteTestError();
16 16
   }
17 17
 
18 18
   public function testClose() {
19
-    throw new PHPUnit_Framework_IncompleteTestError();
19
+	throw new PHPUnit_Framework_IncompleteTestError();
20 20
   }
21 21
 
22 22
   public function testDestroy() {
23
-    throw new PHPUnit_Framework_IncompleteTestError();
23
+	throw new PHPUnit_Framework_IncompleteTestError();
24 24
   }
25 25
 
26 26
   public function testGetIsStarted() {
27
-    throw new PHPUnit_Framework_IncompleteTestError();
27
+	throw new PHPUnit_Framework_IncompleteTestError();
28 28
   }
29 29
 
30 30
   public function testSetSessionID() {
31
-    throw new PHPUnit_Framework_IncompleteTestError();
31
+	throw new PHPUnit_Framework_IncompleteTestError();
32 32
   }
33 33
 
34 34
   public function testSetSessionName() {
35
-    throw new PHPUnit_Framework_IncompleteTestError();
35
+	throw new PHPUnit_Framework_IncompleteTestError();
36 36
   }
37 37
 
38 38
   public function testSetSavePath() {
39
-    throw new PHPUnit_Framework_IncompleteTestError();
39
+	throw new PHPUnit_Framework_IncompleteTestError();
40 40
   }
41 41
 
42 42
   public function testSetUseCustomStorage() {
43
-    throw new PHPUnit_Framework_IncompleteTestError();
43
+	throw new PHPUnit_Framework_IncompleteTestError();
44 44
   }
45 45
 
46 46
   public function testSetCookieModeNone() {
47
-    $session = new THttpSession();
48
-    $session->CookieMode = THttpSessionCookieMode::None;
47
+	$session = new THttpSession();
48
+	$session->CookieMode = THttpSessionCookieMode::None;
49 49
 
50
-    $this->assertEquals(0, ini_get('session.use_cookies_only'));
51
-    $this->assertEquals(0, ini_get('session.use_cookies'));
52
-    $this->assertEquals(THttpSessionCookieMode::None, $session->CookieMode);
50
+	$this->assertEquals(0, ini_get('session.use_cookies_only'));
51
+	$this->assertEquals(0, ini_get('session.use_cookies'));
52
+	$this->assertEquals(THttpSessionCookieMode::None, $session->CookieMode);
53 53
   }
54 54
 
55 55
   public function testSetCookieModeAllow() {
56
-    $session = new THttpSession();
57
-    $session->CookieMode = THttpSessionCookieMode::Allow;
56
+	$session = new THttpSession();
57
+	$session->CookieMode = THttpSessionCookieMode::Allow;
58 58
 
59
-    $this->assertEquals(0, ini_get('session.use_only_cookies'));
60
-    $this->assertEquals(1, ini_get('session.use_cookies'));
61
-    $this->assertEquals(THttpSessionCookieMode::Allow, $session->CookieMode);
59
+	$this->assertEquals(0, ini_get('session.use_only_cookies'));
60
+	$this->assertEquals(1, ini_get('session.use_cookies'));
61
+	$this->assertEquals(THttpSessionCookieMode::Allow, $session->CookieMode);
62 62
   }
63 63
 
64 64
   public function testSetCookieModeAlways() {
65
-    $session = new THttpSession();
66
-    $session->CookieMode = THttpSessionCookieMode::Only;
65
+	$session = new THttpSession();
66
+	$session->CookieMode = THttpSessionCookieMode::Only;
67 67
 
68
-    $this->assertEquals(1, ini_get('session.use_only_cookies'));
69
-    $this->assertEquals(1, ini_get('session.use_cookies'));
70
-    $this->assertEquals(0, ini_get('session.use_trans_sid'));
71
-    $this->assertEquals(THttpSessionCookieMode::Only, $session->CookieMode);
68
+	$this->assertEquals(1, ini_get('session.use_only_cookies'));
69
+	$this->assertEquals(1, ini_get('session.use_cookies'));
70
+	$this->assertEquals(0, ini_get('session.use_trans_sid'));
71
+	$this->assertEquals(THttpSessionCookieMode::Only, $session->CookieMode);
72 72
   }
73 73
 
74 74
   public function testSetAutoStart() {
75
-    throw new PHPUnit_Framework_IncompleteTestError();
75
+	throw new PHPUnit_Framework_IncompleteTestError();
76 76
   }
77 77
 
78 78
   public function testSetGProbability() {
79
-    throw new PHPUnit_Framework_IncompleteTestError();
79
+	throw new PHPUnit_Framework_IncompleteTestError();
80 80
   }
81 81
 
82 82
   public function testSetUseTransparentSessionID() {
83
-    throw new PHPUnit_Framework_IncompleteTestError();
83
+	throw new PHPUnit_Framework_IncompleteTestError();
84 84
   }
85 85
 
86 86
   public function testSetTimeout() {
87
-    throw new PHPUnit_Framework_IncompleteTestError();
87
+	throw new PHPUnit_Framework_IncompleteTestError();
88 88
   }
89 89
 
90 90
   public function testGetIterator() {
91
-    throw new PHPUnit_Framework_IncompleteTestError();
91
+	throw new PHPUnit_Framework_IncompleteTestError();
92 92
   }
93 93
 
94 94
   public function testGetCount() {
95
-    throw new PHPUnit_Framework_IncompleteTestError();
95
+	throw new PHPUnit_Framework_IncompleteTestError();
96 96
   }
97 97
 
98 98
   public function testGetKeys() {
99
-    throw new PHPUnit_Framework_IncompleteTestError();
99
+	throw new PHPUnit_Framework_IncompleteTestError();
100 100
   }
101 101
 
102 102
   public function testItemAt() {
103
-    throw new PHPUnit_Framework_IncompleteTestError();
103
+	throw new PHPUnit_Framework_IncompleteTestError();
104 104
   }
105 105
 
106 106
   public function testAdd() {
107
-    throw new PHPUnit_Framework_IncompleteTestError();
107
+	throw new PHPUnit_Framework_IncompleteTestError();
108 108
   }
109 109
 
110 110
   public function testRemove() {
111
-    throw new PHPUnit_Framework_IncompleteTestError();
111
+	throw new PHPUnit_Framework_IncompleteTestError();
112 112
   }
113 113
 
114 114
   public function testContains() {
115
-    throw new PHPUnit_Framework_IncompleteTestError();
115
+	throw new PHPUnit_Framework_IncompleteTestError();
116 116
   }
117 117
 
118 118
   public function testToArray() {
119
-    throw new PHPUnit_Framework_IncompleteTestError();
119
+	throw new PHPUnit_Framework_IncompleteTestError();
120 120
   }
121 121
 
122 122
   public function testOffsetExists() {
123
-    throw new PHPUnit_Framework_IncompleteTestError();
123
+	throw new PHPUnit_Framework_IncompleteTestError();
124 124
   }
125 125
 
126 126
   public function testOffsetGet() {
127
-    throw new PHPUnit_Framework_IncompleteTestError();
127
+	throw new PHPUnit_Framework_IncompleteTestError();
128 128
   }
129 129
 
130 130
   public function testOffsetSet() {
131
-    throw new PHPUnit_Framework_IncompleteTestError();
131
+	throw new PHPUnit_Framework_IncompleteTestError();
132 132
   }
133 133
 
134 134
   public function testOffsetUnset() {
135
-    throw new PHPUnit_Framework_IncompleteTestError();
135
+	throw new PHPUnit_Framework_IncompleteTestError();
136 136
   }
137 137
 }
Please login to merge, or discard this patch.
tests/unit/Xml/TXmlElementListTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,29 +8,29 @@
 block discarded – undo
8 8
 class TXmlElementListTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
 	public function testConstruct() {
11
-		$element=new TXmlElement('tag');
12
-		$list=new TXmlElementList($element);
13
-		self::assertEquals($element,self::readAttribute($list, '_o'));
11
+		$element = new TXmlElement('tag');
12
+		$list = new TXmlElementList($element);
13
+		self::assertEquals($element, self::readAttribute($list, '_o'));
14 14
 	}
15 15
 
16 16
 	public function testInsertAt() {
17
-		$element=new TXmlElement('tag');
18
-		$list=new TXmlElementList($element);
17
+		$element = new TXmlElement('tag');
18
+		$list = new TXmlElementList($element);
19 19
 		try {
20
-			$list->insertAt(0,'ABadElement');
20
+			$list->insertAt(0, 'ABadElement');
21 21
 			self::fail('Expected TInvalidDataTypeException not thrown');
22 22
 		} catch (TInvalidDataTypeException $e) {}
23
-		$newElement=new TXmlElement('newTag');
24
-		$list->insertAt(0,$newElement);
25
-		self::assertEquals($newElement,$list->itemAt(0));
23
+		$newElement = new TXmlElement('newTag');
24
+		$list->insertAt(0, $newElement);
25
+		self::assertEquals($newElement, $list->itemAt(0));
26 26
 
27 27
 	}
28 28
 
29 29
 	public function testRemoveAt() {
30
-		$element=new TXmlElement('tag');
31
-		$list=new TXmlElementList($element);
32
-		$newElement=new TXmlElement('newTag');
33
-		$list->insertAt(0,$newElement);
34
-		self::assertEquals($newElement,$list->removeAt(0));
30
+		$element = new TXmlElement('tag');
31
+		$list = new TXmlElementList($element);
32
+		$newElement = new TXmlElement('newTag');
33
+		$list->insertAt(0, $newElement);
34
+		self::assertEquals($newElement, $list->removeAt(0));
35 35
 	}
36 36
 }
Please login to merge, or discard this patch.
tests/unit/Xml/TXmlDocumentTest.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -8,28 +8,28 @@  discard block
 block discarded – undo
8 8
 class TXmlDocumentTest extends PHPUnit_Framework_TestCase {
9 9
 
10 10
 	public function testConstruct() {
11
-		$xmldoc=new TXmlDocument ('1.0', 'utf-8');
11
+		$xmldoc = new TXmlDocument('1.0', 'utf-8');
12 12
 		self::assertEquals('1.0', $xmldoc->getVersion());
13 13
 		self::assertEquals('utf-8', $xmldoc->getEncoding());
14 14
 	}
15 15
 
16 16
 	public function testSetVersion() {
17
-		$xmldoc=new TXmlDocument ('1.0', 'utf-8');
17
+		$xmldoc = new TXmlDocument('1.0', 'utf-8');
18 18
 		self::assertEquals('1.0', $xmldoc->getVersion());
19 19
 		$xmldoc->setVersion('2.0');
20 20
 		self::assertEquals('2.0', $xmldoc->getVersion());
21 21
 	}
22 22
 
23 23
 	public function testSetEncoding() {
24
-		$xmldoc=new TXmlDocument ('1.0', 'utf-8');
24
+		$xmldoc = new TXmlDocument('1.0', 'utf-8');
25 25
 		self::assertEquals('utf-8', $xmldoc->getEncoding());
26 26
 		$xmldoc->setEncoding('iso8859-1');
27 27
 		self::assertEquals('iso8859-1', $xmldoc->getEncoding());
28 28
 	}
29 29
 
30 30
 	public function testLoadFromFile() {
31
-		$file=dirname(__FILE__).'/data/test.xml';
32
-		$xmldoc=new TXmlDocument();
31
+		$file = dirname(__FILE__) . '/data/test.xml';
32
+		$xmldoc = new TXmlDocument();
33 33
 		try {
34 34
 			$xmldoc->loadFromFile('unexistentXmlFile.xml');
35 35
 			self::fail('Expected TIOException not thrown');
@@ -37,43 +37,43 @@  discard block
 block discarded – undo
37 37
 
38 38
 		self::assertTrue($xmldoc->loadFromFile($file));
39 39
 		self::assertEquals('1.0', $xmldoc->getVersion());
40
-		self::assertEquals('UTF-8',$xmldoc->getEncoding());
40
+		self::assertEquals('UTF-8', $xmldoc->getEncoding());
41 41
 	}
42 42
 
43 43
 	public function testLoadFromString() {
44
-		$xmlStr='<?xml version="1.0" encoding="UTF-8"?><rootNode><node id="node1" param="attribute1"/><node id="node2" param="attribute2"/></rootNode>';
45
-		$xmldoc=new TXmlDocument();
44
+		$xmlStr = '<?xml version="1.0" encoding="UTF-8"?><rootNode><node id="node1" param="attribute1"/><node id="node2" param="attribute2"/></rootNode>';
45
+		$xmldoc = new TXmlDocument();
46 46
 		self::assertTrue($xmldoc->loadFromString($xmlStr));
47 47
 		self::assertEquals('1.0', $xmldoc->getVersion());
48
-		self::assertEquals('UTF-8',$xmldoc->getEncoding());
48
+		self::assertEquals('UTF-8', $xmldoc->getEncoding());
49 49
 	}
50 50
 
51 51
 	public function testSaveToString() {
52
-		$xmldoc=new TXmlDocument('1.0','utf-8');
52
+		$xmldoc = new TXmlDocument('1.0', 'utf-8');
53 53
 		$xmldoc->setTagName('root');
54
-		$node=new TXmlElement('node');
55
-		$node->setAttribute('param','attribute1');
54
+		$node = new TXmlElement('node');
55
+		$node->setAttribute('param', 'attribute1');
56 56
 		$xmldoc->getElements()->add($node);
57
-		$xmlString=$xmldoc->saveToString();
57
+		$xmlString = $xmldoc->saveToString();
58 58
 		// test magic method
59
-		$magicString=(string)$xmldoc;
60
-		self::assertEquals($magicString,$xmlString);
59
+		$magicString = (string) $xmldoc;
60
+		self::assertEquals($magicString, $xmlString);
61 61
 		// Result string should be :
62
-		$resultString="<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n    <node param=\"attribute1\"\n</root>";
62
+		$resultString = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n    <node param=\"attribute1\"\n</root>";
63 63
 		self::assertEquals($xmlString, $magicString);
64 64
 
65 65
 	}
66 66
 
67 67
 	public function testSaveToFile() {
68
-		$file=dirname(__FILE__).'/data/tmp.xml';
69
-		if (!is_writable(dirname($file))) self::markTestSkipped(dirname($file).' must be writable for this test');
70
-		$xmldoc=new TXmlDocument('1.0','utf-8');
68
+		$file = dirname(__FILE__) . '/data/tmp.xml';
69
+		if (!is_writable(dirname($file))) self::markTestSkipped(dirname($file) . ' must be writable for this test');
70
+		$xmldoc = new TXmlDocument('1.0', 'utf-8');
71 71
 		$xmldoc->setTagName('root');
72
-		$node=new TXmlElement('node');
73
-		$node->setAttribute('param','attribute1');
72
+		$node = new TXmlElement('node');
73
+		$node->setAttribute('param', 'attribute1');
74 74
 		$xmldoc->getElements()->add($node);
75 75
 		$xmldoc->saveToFile($file);
76 76
 		self::assertTrue(is_file($file));
77
-		if (is_file($file)) unlink ($file);
77
+		if (is_file($file)) unlink($file);
78 78
 	}
79 79
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
 	public function testSaveToFile() {
68 68
 		$file=dirname(__FILE__).'/data/tmp.xml';
69
-		if (!is_writable(dirname($file))) self::markTestSkipped(dirname($file).' must be writable for this test');
69
+		if (!is_writable(dirname($file))) {
70
+			self::markTestSkipped(dirname($file).' must be writable for this test');
71
+		}
70 72
 		$xmldoc=new TXmlDocument('1.0','utf-8');
71 73
 		$xmldoc->setTagName('root');
72 74
 		$node=new TXmlElement('node');
@@ -74,6 +76,8 @@  discard block
 block discarded – undo
74 76
 		$xmldoc->getElements()->add($node);
75 77
 		$xmldoc->saveToFile($file);
76 78
 		self::assertTrue(is_file($file));
77
-		if (is_file($file)) unlink ($file);
79
+		if (is_file($file)) {
80
+			unlink ($file);
81
+		}
78 82
 	}
79 83
 }
Please login to merge, or discard this patch.
tests/unit/Xml/TXmlElementTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@
 block discarded – undo
73 73
 
74 74
 	public function testToString() {
75 75
 		$element = new TXmlElement('tag');
76
-		self::assertEquals('<tag />', (string)$element);
76
+		self::assertEquals('<tag />', (string) $element);
77 77
 		$element->setAttribute('key', 'value');
78
-		self::assertEquals('<tag key="value" />', (string)$element);
78
+		self::assertEquals('<tag key="value" />', (string) $element);
79 79
 		$element->setValue('value');
80
-		self::assertEquals('<tag key="value">value</tag>', (string)$element);
80
+		self::assertEquals('<tag key="value">value</tag>', (string) $element);
81 81
 	}
82 82
 }
Please login to merge, or discard this patch.