Completed
Push — scrutinizer ( c2ef4a...84e9d0 )
by Fabio
22:07
created
tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@
 block discarded – undo
9 9
 class TRequiredFieldValidatorTest extends PHPUnit_Framework_TestCase {
10 10
 
11 11
   public function testGetEmptyInitialValue() {
12
-    $validator = new TRequiredFieldValidator();
13
-    try {
14
-    	$value = $validator->getInitialValue();
15
-    } catch (TConfigurationException $e) {
16
-    	//since prado 3.2.2 you need to set at least ControlToValidate
17
-    	$value = '';
18
-    }
19
-    $this->assertEquals('', $value);
12
+	$validator = new TRequiredFieldValidator();
13
+	try {
14
+		$value = $validator->getInitialValue();
15
+	} catch (TConfigurationException $e) {
16
+		//since prado 3.2.2 you need to set at least ControlToValidate
17
+		$value = '';
18
+	}
19
+	$this->assertEquals('', $value);
20 20
   }
21 21
 }
Please login to merge, or discard this patch.
tests/unit/Web/UI/WebControls/TDropDownListTest.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 class TDropDownListTest extends PHPUnit_Framework_TestCase {
10 10
 
11 11
   public function testSetDataSource() {
12
-    $list = new TDropDownList();
13
-    $data = array('a' => 1,
12
+	$list = new TDropDownList();
13
+	$data = array('a' => 1,
14 14
 		  'b' => 2,
15 15
 		  'c' => 3);
16
-    $list->setDataSource($data);
17
-    $list->dataBind();
18
-    $items = $list->getItems();
19
-    $this->assertTrue($items instanceof TListItemCollection);
20
-    $expected_keys = array_keys($data);
21
-    $i = 0;
22
-    foreach($items as $item) {
23
-      $this->assertEquals($expected_keys[$i], $item->getValue());
24
-      $this->assertEquals((string)$data[$expected_keys[$i]], $item->getText());
25
-      $i++;
26
-    }
16
+	$list->setDataSource($data);
17
+	$list->dataBind();
18
+	$items = $list->getItems();
19
+	$this->assertTrue($items instanceof TListItemCollection);
20
+	$expected_keys = array_keys($data);
21
+	$i = 0;
22
+	foreach($items as $item) {
23
+	  $this->assertEquals($expected_keys[$i], $item->getValue());
24
+	  $this->assertEquals((string)$data[$expected_keys[$i]], $item->getText());
25
+	  $i++;
26
+	}
27 27
   }
28 28
 }
29 29
 
Please login to merge, or discard this patch.
tests/unit/Web/UI/WebControls/AllTests.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,18 +12,18 @@
 block discarded – undo
12 12
 
13 13
 class Web_UI_WebControls_AllTests {
14 14
   public static function main() {
15
-    PHPUnit_TextUI_TestRunner::run(self::suite());
15
+	PHPUnit_TextUI_TestRunner::run(self::suite());
16 16
   }
17 17
 
18 18
   public static function suite() {
19
-    $suite = new PHPUnit_Framework_TestSuite('System.Web.UI.WebControls');
19
+	$suite = new PHPUnit_Framework_TestSuite('System.Web.UI.WebControls');
20 20
 
21 21
 	$suite->addTestSuite('TDropDownListTest');
22 22
 	$suite->addTestSuite('TLabelTest');
23 23
 	$suite->addTestSuite('TRequiredFieldValidatorTest');
24
-    $suite->addTestSuite('TXmlTransformTest');
24
+	$suite->addTestSuite('TXmlTransformTest');
25 25
 
26
-    return $suite;
26
+	return $suite;
27 27
   }
28 28
 }
29 29
 
Please login to merge, or discard this patch.
tests/unit/Web/UI/ActiveControls/TActiveHiddenFieldTest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 class TActiveHiddenFieldTest extends PHPUnit_Framework_TestCase {
10 10
 
11 11
   public function testSetValue() {
12
-    $field = new TActiveHiddenField();
13
-    $field->setValue('Test');
14
-    $this->assertEquals('Test', $field->getValue());
12
+	$field = new TActiveHiddenField();
13
+	$field->setValue('Test');
14
+	$this->assertEquals('Test', $field->getValue());
15 15
   }
16 16
 }
Please login to merge, or discard this patch.
tests/unit/Web/UI/ActiveControls/AllTests.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@
 block discarded – undo
9 9
 
10 10
 class Web_UI_ActiveControls_AllTests {
11 11
   public static function main() {
12
-    PHPUnit_TextUI_TestRunner::run(self::suite());
12
+	PHPUnit_TextUI_TestRunner::run(self::suite());
13 13
   }
14 14
 
15 15
   public static function suite() {
16
-    $suite = new PHPUnit_Framework_TestSuite('System.Web.UI.ActiveControls');
16
+	$suite = new PHPUnit_Framework_TestSuite('System.Web.UI.ActiveControls');
17 17
 
18 18
 	$suite->addTestSuite('TActiveHiddenFieldTest');
19
-    return $suite;
19
+	return $suite;
20 20
   }
21 21
 }
22 22
 
Please login to merge, or discard this patch.
tests/unit/Web/UI/TClientScriptManagerTest.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -9,139 +9,139 @@
 block discarded – undo
9 9
 class TClientScriptManagerTest extends PHPUnit_Framework_TestCase {
10 10
 
11 11
   public function testConstruct() {
12
-    throw new PHPUnit_Framework_IncompleteTestError();
12
+	throw new PHPUnit_Framework_IncompleteTestError();
13 13
   }
14 14
 
15 15
   public function testRegisterPradoScript() {
16
-    throw new PHPUnit_Framework_IncompleteTestError();
16
+	throw new PHPUnit_Framework_IncompleteTestError();
17 17
   }
18 18
 
19 19
   public function testGetPradoScriptAssetUrl() {
20
-    throw new PHPUnit_Framework_IncompleteTestError();
20
+	throw new PHPUnit_Framework_IncompleteTestError();
21 21
   }
22 22
 
23 23
   public function testRegisterJavascriptPackages() {
24
-    throw new PHPUnit_Framework_IncompleteTestError();
24
+	throw new PHPUnit_Framework_IncompleteTestError();
25 25
   }
26 26
 
27 27
   public function testGetCallbackReference() {
28
-    throw new PHPUnit_Framework_IncompleteTestError();
28
+	throw new PHPUnit_Framework_IncompleteTestError();
29 29
   }
30 30
 
31 31
   public function testRegisterCallbackControl() {
32
-    throw new PHPUnit_Framework_IncompleteTestError();
32
+	throw new PHPUnit_Framework_IncompleteTestError();
33 33
   }
34 34
 
35 35
   public function testRegisterPostBackControl() {
36
-    throw new PHPUnit_Framework_IncompleteTestError();
36
+	throw new PHPUnit_Framework_IncompleteTestError();
37 37
   }
38 38
 
39 39
   public function testRegisterDefaultButton() {
40
-    throw new PHPUnit_Framework_IncompleteTestError();
40
+	throw new PHPUnit_Framework_IncompleteTestError();
41 41
   }
42 42
 
43 43
   public function testRegisterFocusControl() {
44
-    throw new PHPUnit_Framework_IncompleteTestError();
44
+	throw new PHPUnit_Framework_IncompleteTestError();
45 45
   }
46 46
 
47 47
   public function testRegisterStyleSheetFile() {
48
-    throw new PHPUnit_Framework_IncompleteTestError();
48
+	throw new PHPUnit_Framework_IncompleteTestError();
49 49
   }
50 50
 
51 51
   public function testRegisterStyleSheet() {
52
-    throw new PHPUnit_Framework_IncompleteTestError();
52
+	throw new PHPUnit_Framework_IncompleteTestError();
53 53
   }
54 54
 
55 55
   public function testRegisterHeadScriptFile() {
56
-    throw new PHPUnit_Framework_IncompleteTestError();
56
+	throw new PHPUnit_Framework_IncompleteTestError();
57 57
   }
58 58
 
59 59
   public function testRegisterHeadScript() {
60
-    throw new PHPUnit_Framework_IncompleteTestError();
60
+	throw new PHPUnit_Framework_IncompleteTestError();
61 61
   }
62 62
 
63 63
   public function testRegisterScriptFile() {
64
-    throw new PHPUnit_Framework_IncompleteTestError();
64
+	throw new PHPUnit_Framework_IncompleteTestError();
65 65
   }
66 66
 
67 67
   public function testRegisterBeginScript() {
68
-    throw new PHPUnit_Framework_IncompleteTestError();
68
+	throw new PHPUnit_Framework_IncompleteTestError();
69 69
   }
70 70
 
71 71
   public function testRegisterEndScript() {
72
-    throw new PHPUnit_Framework_IncompleteTestError();
72
+	throw new PHPUnit_Framework_IncompleteTestError();
73 73
   }
74 74
 
75 75
   public function testRegisterHiddenField() {
76
-    throw new PHPUnit_Framework_IncompleteTestError();
76
+	throw new PHPUnit_Framework_IncompleteTestError();
77 77
   }
78 78
 
79 79
   public function testIsStyleSheetFileRegistered() {
80
-    throw new PHPUnit_Framework_IncompleteTestError();
80
+	throw new PHPUnit_Framework_IncompleteTestError();
81 81
   }
82 82
 
83 83
   public function testIsStyleSheetRegistered() {
84
-    throw new PHPUnit_Framework_IncompleteTestError();
84
+	throw new PHPUnit_Framework_IncompleteTestError();
85 85
   }
86 86
 
87 87
   public function testIsHeadScriptFileRegistered() {
88
-    throw new PHPUnit_Framework_IncompleteTestError();
88
+	throw new PHPUnit_Framework_IncompleteTestError();
89 89
   }
90 90
 
91 91
   public function testIsHeadScriptRegistered() {
92
-    throw new PHPUnit_Framework_IncompleteTestError();
92
+	throw new PHPUnit_Framework_IncompleteTestError();
93 93
   }
94 94
 
95 95
   public function testIsScriptFileRegistered() {
96
-    throw new PHPUnit_Framework_IncompleteTestError();
96
+	throw new PHPUnit_Framework_IncompleteTestError();
97 97
   }
98 98
 
99 99
   public function testIsBeginScriptRegistered() {
100
-    throw new PHPUnit_Framework_IncompleteTestError();
100
+	throw new PHPUnit_Framework_IncompleteTestError();
101 101
   }
102 102
 
103 103
   public function testIsEndScriptRegistered() {
104
-    throw new PHPUnit_Framework_IncompleteTestError();
104
+	throw new PHPUnit_Framework_IncompleteTestError();
105 105
   }
106 106
 
107 107
   public function testHasEndScripts() {
108
-    throw new PHPUnit_Framework_IncompleteTestError();
108
+	throw new PHPUnit_Framework_IncompleteTestError();
109 109
   }
110 110
 
111 111
   public function testHasBeginScripts() {
112
-    throw new PHPUnit_Framework_IncompleteTestError();
112
+	throw new PHPUnit_Framework_IncompleteTestError();
113 113
   }
114 114
 
115 115
   public function testIsHiddenFieldRegistered() {
116
-    throw new PHPUnit_Framework_IncompleteTestError();
116
+	throw new PHPUnit_Framework_IncompleteTestError();
117 117
   }
118 118
 
119 119
   public function testRenderStyleSheetFiles() {
120
-    throw new PHPUnit_Framework_IncompleteTestError();
120
+	throw new PHPUnit_Framework_IncompleteTestError();
121 121
   }
122 122
 
123 123
   public function testRenderStyleSheets() {
124
-    throw new PHPUnit_Framework_IncompleteTestError();
124
+	throw new PHPUnit_Framework_IncompleteTestError();
125 125
   }
126 126
 
127 127
   public function testRenderHeadScriptFiles() {
128
-    throw new PHPUnit_Framework_IncompleteTestError();
128
+	throw new PHPUnit_Framework_IncompleteTestError();
129 129
   }
130 130
 
131 131
   public function testRenderHeadScripts() {
132
-    throw new PHPUnit_Framework_IncompleteTestError();
132
+	throw new PHPUnit_Framework_IncompleteTestError();
133 133
   }
134 134
 
135 135
   public function testRenderScriptFiles() {
136
-    throw new PHPUnit_Framework_IncompleteTestError();
136
+	throw new PHPUnit_Framework_IncompleteTestError();
137 137
   }
138 138
 
139 139
   public function testRenderBeginScripts() {
140
-    throw new PHPUnit_Framework_IncompleteTestError();
140
+	throw new PHPUnit_Framework_IncompleteTestError();
141 141
   }
142 142
 
143 143
   public function testRenderEndScripts() {
144
-    throw new PHPUnit_Framework_IncompleteTestError();
144
+	throw new PHPUnit_Framework_IncompleteTestError();
145 145
   }
146 146
 
147 147
 }
148 148
\ No newline at end of file
Please login to merge, or discard this patch.
tests/unit/Web/UI/AllTests.php 1 patch
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.
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('<tag key="value">');
18
+		$html = THttpUtility::htmlDecode('<tag key="value">');
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 1 patch
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.