Passed
Push — 1.10.x ( 12c7e7...f34bae )
by Angel Fernando Quiroz
46:03
created
plugin/pens/lib/tests/test_pens_request.php 1 patch
Indentation   +163 added lines, -163 removed lines patch added patch discarded remove patch
@@ -44,170 +44,170 @@
 block discarded – undo
44 44
  */
45 45
 class TestPENSRequest extends UnitTestCase {
46 46
 	
47
-	/**
48
-	 * Valid arguments to be used for tests
49
-	 * 
50
-	 * @var array
51
-	 */
52
-	private $args = null;
53
-	
54
-	public function setUp() {
55
-		$this->args = array(
56
-			"pens-version" => "1.0.0",
57
-			"command" => "collect",
58
-			"package-type" => "aicc-pkg",
59
-			"package-type-version" => "1.0",
60
-			"package-format" => "zip",
61
-			"package-id" => "http://myurl.com/12345",
62
-			"package-url" => "http://myurl.com/mypackage.zip",
63
-			"package-url-expiry" => "2006-04-01T06:51:29Z",
64
-			"client" => "Authorware7",
65
-			"receipt" => "mailto:[email protected]",
66
-			"package-url-user-id" => "guillaumev",
67
-			"package-url-account" => "toto",
68
-			"package-url-password" => "12345",
69
-			"system-user-id" => "guillaumev",
70
-			"system-password" => "12345",
71
-			"alerts" => "http://myurl.com/alerts",
72
-			"vendor-data" => "here are my data");
73
-	}
74
-	
75
-	public function createObject($myargs) {
76
-		return PENSRequestFactory::createPENSRequest($myargs);
77
-	}
78
-	
79
-	public function exceptionTestForValue($key, $value, $code) {
80
-		try {
81
-			$myargs = $this->args;
82
-			if($value === null) {
83
-				unset($myargs[$key]);
84
-			} else {
85
-				$myargs[$key] = $value;
86
-			}
87
-			$object = $this->createObject($myargs);
88
-			$this->fail();
89
-		} catch(PENSException $e) {
90
-			$this->assertEqual($e->getCode(), $code);
91
-		}
92
-	}
93
-	
94
-	public function testPensVersionInvalid() {
95
-		$this->exceptionTestForValue("pens-version", "0.8.0", 2001);
96
-	}
97
-	
98
-	public function testPensVersionNull() {
99
-		$this->exceptionTestForValue("pens-version", null, 2001);
100
-	}
101
-	
102
-	
103
-	public function testCommandInvalid() {
104
-		$this->exceptionTestForValue("command", "testing", 2002);
105
-	}
106
-	
107
-	public function testCommandNull() {
108
-		$this->exceptionTestForValue("command", null, 2002);
109
-	}
110
-	
111
-	public function testPackageTypeInvalid() {
112
-		$this->exceptionTestForValue("package-type", "testing", 2003);
113
-	}
114
-	
115
-	public function testPackageTypeNull() {
116
-		$this->exceptionTestForValue("package-type", null, 2003);
117
-	}
118
-	
119
-	public function testPackageTypeVersionNull() {
120
-		$this->exceptionTestForValue("package-type-version", null, 2004);
121
-	}
122
-	
123
-	public function testPackageFormatInvalid() {
124
-		$this->exceptionTestForValue("package-format", "testing", 2005);
125
-	}
126
-	
127
-	public function testPackageFormatNull() {
128
-		$this->exceptionTestForValue("package-format", null, 2005);
129
-	}
130
-	
131
-	public function testPackageIdInvalid() {
132
-		$this->exceptionTestForValue("package-id", "testing", 2007);
133
-	}
134
-	
135
-	public function testPackageIdNull() {
136
-		$this->exceptionTestForValue("package-id", null, 2007);
137
-	}
138
-	
139
-	public function testPackageUrlInvalid() {
140
-		$this->exceptionTestForValue("package-url", "testing", 2008);
141
-	}
142
-	
143
-	public function testPackageUrlInvalid2() {
144
-		$this->exceptionTestForValue("package-url", "http://myurl.com/mypackage", 2008);
145
-	}
146
-	
147
-	public function testPackageUrlNull() {
148
-		$this->exceptionTestForValue("package-url", null, 2008);
149
-	}
150
-	
151
-	public function testPackageUrlExpiryNull() {
152
-		$this->exceptionTestForValue("package-url-expiry", null, 2009);
153
-	}
154
-	
155
-	public function testPackageUrlExpiryInvalid() {
156
-		$this->exceptionTestForValue("package-url-expiry", "testing", 2009);
157
-	}
158
-	
159
-	public function testClientNull() {
160
-		$this->exceptionTestForValue("client", null, 2010);
161
-	}
162
-	
163
-	public function testReceiptNull() {
164
-		$this->exceptionTestForValue("receipt", null, 2011);
165
-	}
166
-	
167
-	public function testReceiptInvalid() {
168
-		$this->exceptionTestForValue("receipt", "testing", 2011);
169
-	}
170
-	
171
-	public function testAlertsInvalid() {
172
-		$this->exceptionTestForValue("alerts", "testing", 1201);
173
-	}
174
-	
175
-	public function testReceiptValid() {
176
-		try {
177
-			$myargs = $this->args;
178
-			$myargs["receipt"] = "mailto:[email protected],[email protected]";
179
-			$object = $this->createObject($myargs);
180
-			$this->pass();
181
-		} catch(PENSException $e) {
182
-			$this->fail();
183
-		}
184
-	}
185
-	
186
-	public function testValid() {
187
-		try {
188
-			$object = $this->createObject($this->args);
189
-			$this->assertIsA($object, "PENSRequestCollect");
190
-			$this->assertEqual($object->getPensVersion(), "1.0.0");
191
-			$this->assertEqual($object->getPackageType(), "aicc-pkg");
192
-			$this->assertEqual($object->getPackageTypeVersion(), "1.0");
193
-			$this->assertEqual($object->getPackageFormat(), "zip");
194
-			$this->assertEqual($object->getPackageId(), "http://myurl.com/12345");
195
-			$this->assertEqual($object->getPackageUrl(), "http://myurl.com/mypackage.zip");
196
-			$this->assertIsA($object->getPackageUrlExpiry(), "DateTime");
197
-			$this->assertEqual($object->getClient(), "Authorware7");
198
-			$this->assertEqual($object->getReceipt(), "mailto:[email protected]");
199
-			$this->assertEqual($object->getPackageUrlUserId(), "guillaumev");
200
-			$this->assertEqual($object->getPackageUrlAccount(), "toto");
201
-			$this->assertEqual($object->getPackageUrlPassword(), "12345");
202
-			$this->assertEqual($object->getSystemUserId(), "guillaumev");
203
-			$this->assertEqual($object->getSystemPassword(), "12345");
204
-			$this->assertEqual($object->getAlerts(), "http://myurl.com/alerts");
205
-			$this->assertEqual($object->getVendorData(), "here are my data");
47
+    /**
48
+     * Valid arguments to be used for tests
49
+     * 
50
+     * @var array
51
+     */
52
+    private $args = null;
53
+	
54
+    public function setUp() {
55
+        $this->args = array(
56
+            "pens-version" => "1.0.0",
57
+            "command" => "collect",
58
+            "package-type" => "aicc-pkg",
59
+            "package-type-version" => "1.0",
60
+            "package-format" => "zip",
61
+            "package-id" => "http://myurl.com/12345",
62
+            "package-url" => "http://myurl.com/mypackage.zip",
63
+            "package-url-expiry" => "2006-04-01T06:51:29Z",
64
+            "client" => "Authorware7",
65
+            "receipt" => "mailto:[email protected]",
66
+            "package-url-user-id" => "guillaumev",
67
+            "package-url-account" => "toto",
68
+            "package-url-password" => "12345",
69
+            "system-user-id" => "guillaumev",
70
+            "system-password" => "12345",
71
+            "alerts" => "http://myurl.com/alerts",
72
+            "vendor-data" => "here are my data");
73
+    }
74
+	
75
+    public function createObject($myargs) {
76
+        return PENSRequestFactory::createPENSRequest($myargs);
77
+    }
78
+	
79
+    public function exceptionTestForValue($key, $value, $code) {
80
+        try {
81
+            $myargs = $this->args;
82
+            if($value === null) {
83
+                unset($myargs[$key]);
84
+            } else {
85
+                $myargs[$key] = $value;
86
+            }
87
+            $object = $this->createObject($myargs);
88
+            $this->fail();
89
+        } catch(PENSException $e) {
90
+            $this->assertEqual($e->getCode(), $code);
91
+        }
92
+    }
93
+	
94
+    public function testPensVersionInvalid() {
95
+        $this->exceptionTestForValue("pens-version", "0.8.0", 2001);
96
+    }
97
+	
98
+    public function testPensVersionNull() {
99
+        $this->exceptionTestForValue("pens-version", null, 2001);
100
+    }
101
+	
102
+	
103
+    public function testCommandInvalid() {
104
+        $this->exceptionTestForValue("command", "testing", 2002);
105
+    }
106
+	
107
+    public function testCommandNull() {
108
+        $this->exceptionTestForValue("command", null, 2002);
109
+    }
110
+	
111
+    public function testPackageTypeInvalid() {
112
+        $this->exceptionTestForValue("package-type", "testing", 2003);
113
+    }
114
+	
115
+    public function testPackageTypeNull() {
116
+        $this->exceptionTestForValue("package-type", null, 2003);
117
+    }
118
+	
119
+    public function testPackageTypeVersionNull() {
120
+        $this->exceptionTestForValue("package-type-version", null, 2004);
121
+    }
122
+	
123
+    public function testPackageFormatInvalid() {
124
+        $this->exceptionTestForValue("package-format", "testing", 2005);
125
+    }
126
+	
127
+    public function testPackageFormatNull() {
128
+        $this->exceptionTestForValue("package-format", null, 2005);
129
+    }
130
+	
131
+    public function testPackageIdInvalid() {
132
+        $this->exceptionTestForValue("package-id", "testing", 2007);
133
+    }
134
+	
135
+    public function testPackageIdNull() {
136
+        $this->exceptionTestForValue("package-id", null, 2007);
137
+    }
138
+	
139
+    public function testPackageUrlInvalid() {
140
+        $this->exceptionTestForValue("package-url", "testing", 2008);
141
+    }
142
+	
143
+    public function testPackageUrlInvalid2() {
144
+        $this->exceptionTestForValue("package-url", "http://myurl.com/mypackage", 2008);
145
+    }
146
+	
147
+    public function testPackageUrlNull() {
148
+        $this->exceptionTestForValue("package-url", null, 2008);
149
+    }
150
+	
151
+    public function testPackageUrlExpiryNull() {
152
+        $this->exceptionTestForValue("package-url-expiry", null, 2009);
153
+    }
154
+	
155
+    public function testPackageUrlExpiryInvalid() {
156
+        $this->exceptionTestForValue("package-url-expiry", "testing", 2009);
157
+    }
158
+	
159
+    public function testClientNull() {
160
+        $this->exceptionTestForValue("client", null, 2010);
161
+    }
162
+	
163
+    public function testReceiptNull() {
164
+        $this->exceptionTestForValue("receipt", null, 2011);
165
+    }
166
+	
167
+    public function testReceiptInvalid() {
168
+        $this->exceptionTestForValue("receipt", "testing", 2011);
169
+    }
170
+	
171
+    public function testAlertsInvalid() {
172
+        $this->exceptionTestForValue("alerts", "testing", 1201);
173
+    }
174
+	
175
+    public function testReceiptValid() {
176
+        try {
177
+            $myargs = $this->args;
178
+            $myargs["receipt"] = "mailto:[email protected],[email protected]";
179
+            $object = $this->createObject($myargs);
180
+            $this->pass();
181
+        } catch(PENSException $e) {
182
+            $this->fail();
183
+        }
184
+    }
185
+	
186
+    public function testValid() {
187
+        try {
188
+            $object = $this->createObject($this->args);
189
+            $this->assertIsA($object, "PENSRequestCollect");
190
+            $this->assertEqual($object->getPensVersion(), "1.0.0");
191
+            $this->assertEqual($object->getPackageType(), "aicc-pkg");
192
+            $this->assertEqual($object->getPackageTypeVersion(), "1.0");
193
+            $this->assertEqual($object->getPackageFormat(), "zip");
194
+            $this->assertEqual($object->getPackageId(), "http://myurl.com/12345");
195
+            $this->assertEqual($object->getPackageUrl(), "http://myurl.com/mypackage.zip");
196
+            $this->assertIsA($object->getPackageUrlExpiry(), "DateTime");
197
+            $this->assertEqual($object->getClient(), "Authorware7");
198
+            $this->assertEqual($object->getReceipt(), "mailto:[email protected]");
199
+            $this->assertEqual($object->getPackageUrlUserId(), "guillaumev");
200
+            $this->assertEqual($object->getPackageUrlAccount(), "toto");
201
+            $this->assertEqual($object->getPackageUrlPassword(), "12345");
202
+            $this->assertEqual($object->getSystemUserId(), "guillaumev");
203
+            $this->assertEqual($object->getSystemPassword(), "12345");
204
+            $this->assertEqual($object->getAlerts(), "http://myurl.com/alerts");
205
+            $this->assertEqual($object->getVendorData(), "here are my data");
206 206
 			
207
-		} catch(PENSException $e) {
208
-			$this->fail();
209
-		}
210
-	}
207
+        } catch(PENSException $e) {
208
+            $this->fail();
209
+        }
210
+    }
211 211
 	
212 212
 	
213 213
 }
Please login to merge, or discard this patch.
plugin/tour/src/tour_plugin.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * The Tour class allows a guided tour in HTML5 of the Chamilo interface
5
- * @author Angel Fernando Quiroz Campos <[email protected]>
6
- * @package chamilo.plugin.tour
7
- */
4
+     * The Tour class allows a guided tour in HTML5 of the Chamilo interface
5
+     * @author Angel Fernando Quiroz Campos <[email protected]>
6
+     * @package chamilo.plugin.tour
7
+     */
8 8
 class Tour extends Plugin
9 9
 {
10 10
     /**
Please login to merge, or discard this patch.
plugin/tour/ajax/save.ajax.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Get the intro steps for the web page
5
- * @author Angel Fernando Quiroz Campos <[email protected]>
6
- * @package chamilo.plugin.tour
7
- */
4
+     * Get the intro steps for the web page
5
+     * @author Angel Fernando Quiroz Campos <[email protected]>
6
+     * @package chamilo.plugin.tour
7
+     */
8 8
 /**
9
- * Init
10
- */
9
+     * Init
10
+     */
11 11
 require_once __DIR__ . '/../../../main/inc/global.inc.php';
12 12
 require_once __DIR__ . '/../config.php';
13 13
 
Please login to merge, or discard this patch.
plugin/tour/ajax/steps.ajax.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Get the intro steps for the web page
5
- * @author Angel Fernando Quiroz Campos <[email protected]>
6
- * @package chamilo.plugin.tour
7
- */
4
+     * Get the intro steps for the web page
5
+     * @author Angel Fernando Quiroz Campos <[email protected]>
6
+     * @package chamilo.plugin.tour
7
+     */
8 8
 require_once __DIR__.'/../../../main/inc/global.inc.php';
9 9
 require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
10 10
 require_once api_get_path(PLUGIN_PATH) . 'tour/src/tour_plugin.class.php';
Please login to merge, or discard this patch.
plugin/advanced_subscription/src/AdvancedSubscriptionPlugin.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1069,7 +1069,7 @@
 block discarded – undo
1069 1069
      */
1070 1070
     public function getStatusMessage($status, $isAble = true)
1071 1071
     {
1072
-	$message = '';
1072
+    $message = '';
1073 1073
         switch ($status) {
1074 1074
             case ADVANCED_SUBSCRIPTION_QUEUE_STATUS_NO_QUEUE:
1075 1075
                 if ($isAble) {
Please login to merge, or discard this patch.
plugin/advanced_subscription/src/HookAdvancedSubscription.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if ($data['type'] === HOOK_EVENT_TYPE_PRE) {
68 68
 
69 69
         } elseif ($data['type'] === HOOK_EVENT_TYPE_POST) {
70
-           /** @var \nusoap_server $server */
70
+            /** @var \nusoap_server $server */
71 71
             $server = &$data['server'];
72 72
 
73 73
             /** WSSessionListInCategory */
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         }
425 425
         if (!WSHelperVerifyKey($params)) {
426 426
 
427
-           //return return_error(WS_ERROR_SECRET_KEY);
427
+            //return return_error(WS_ERROR_SECRET_KEY);
428 428
         }
429 429
         // Check if category ID is set
430 430
         if (!empty($params['id']) && empty($params['name'])) {
Please login to merge, or discard this patch.
plugin/advanced_subscription/src/scripts/insert_session_fields.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 /**
4
- * This script generates session fields needed for this plugin
5
- * @package chamilo.plugin.advanced_subscription
6
- */
4
+     * This script generates session fields needed for this plugin
5
+     * @package chamilo.plugin.advanced_subscription
6
+     */
7 7
 
8 8
 //exit;
9 9
 
Please login to merge, or discard this patch.
plugin/advanced_subscription/src/terms_and_conditions.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 /**
4
- * Script to show sessions terms and conditions
5
- * @package chamilo.plugin.advanced_subscription
6
- */
4
+     * Script to show sessions terms and conditions
5
+     * @package chamilo.plugin.advanced_subscription
6
+     */
7 7
 /**
8
- * Init
9
- */
8
+     * Init
9
+     */
10 10
 require_once __DIR__ . '/../config.php';
11 11
 // start plugin
12 12
 $plugin = AdvancedSubscriptionPlugin::create();
Please login to merge, or discard this patch.
plugin/advanced_subscription/test/ws_session_user.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* For license terms, see /license.txt */
3 3
 /**
4
- * A script to test session details by user web service
5
- * @package chamilo.plugin.advanced_subscription
6
- */
4
+     * A script to test session details by user web service
5
+     * @package chamilo.plugin.advanced_subscription
6
+     */
7 7
 
8 8
 /**
9 9
  * Init
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
     //error_log($secret_key.'-'.$security_key);
58 58
 }
59 59
 /**
60
- * End WSHelperVerifyKey
61
- */
60
+     * End WSHelperVerifyKey
61
+     */
62 62
 
63 63
 $params['secret_key'] = sha1($security_key);
64 64
 
Please login to merge, or discard this patch.