File tree Expand file tree Collapse file tree 6 files changed +13
-28
lines changed Expand file tree Collapse file tree 6 files changed +13
-28
lines changed Original file line number Diff line number Diff line change 35
35
},
36
36
"autoload" : {
37
37
"classmap" : [
38
- " core" ,
39
- " http" ,
40
- " xep" ,
41
- " xmpp" ,
42
- " jaxl.php"
38
+ " src/JAXL"
43
39
],
44
40
"exclude-from-classmap" : [
45
41
" /tests/"
Original file line number Diff line number Diff line change 2
2
<ruleset name =" JAXL" >
3
3
<description >The JAXL coding standard (based on PSR-2 excluding some rules).</description >
4
4
5
- <file >core</file >
6
5
<file >examples</file >
7
- <file >http</file >
8
- <file >tests</file >
9
- <file >xep</file >
10
- <file >xmpp</file >
11
- <file >jaxl.php</file >
6
+ <file >src/JAXL</file >
12
7
<file >jaxlctl</file >
13
8
14
9
<arg value =" p" />
28
23
<severity >0</severity >
29
24
</rule >
30
25
31
- <!-- TODO: Register autoload (spl_autoload_register), remove include and require everywhere then remove this rule. -->
32
26
<rule ref =" PSR1.Files.SideEffects.FoundWithSymbols" >
33
- <severity >0</ severity >
27
+ <exclude-pattern >examples</ exclude-pattern >
34
28
</rule >
35
29
36
30
<!-- TODO: Rename all methods then remove this rule. -->
Original file line number Diff line number Diff line change @@ -479,11 +479,10 @@ public function start(array $opts = array())
479
479
// emit
480
480
$ this ->ev ->emit ('on_disconnect ' );
481
481
} else {
482
- // if connection to the destination fails
483
-
484
- if ($ this ->trans ->errno == 61
485
- || $ this ->trans ->errno == 110
486
- || $ this ->trans ->errno == 111
482
+ // If connection to the destination fails.
483
+ if ($ this ->trans ->errno == 61 ||
484
+ $ this ->trans ->errno == 110 ||
485
+ $ this ->trans ->errno == 111
487
486
) {
488
487
JAXLLogger::debug ("unable to connect with errno " .$ this ->trans ->errno ." ( " .$ this ->trans ->errstr .") " );
489
488
$ this ->retry ();
Original file line number Diff line number Diff line change @@ -4,15 +4,12 @@ class JAXLLoggerTest extends PHPUnit_Framework_TestCase
4
4
{
5
5
6
6
/**
7
- * @runInSeparateProcess<--fixme
7
+ * @runInSeparateProcess
8
8
*/
9
9
public function testColorize ()
10
10
{
11
11
$ msg = 'Test message ' ;
12
12
13
- // TODO: Fix JAXL to run with @runInSeparateProcess and remove following line.
14
- $ current = JAXLLogger::$ colorize ;
15
-
16
13
JAXLLogger::$ colorize = false ;
17
14
$ this ->assertEquals ($ msg , JAXLLogger::colorize ($ msg , JAXLLogger::ERROR ));
18
15
@@ -24,9 +21,6 @@ public function testColorize()
24
21
JAXLLogger::ERROR => $ color
25
22
));
26
23
$ this ->assertEquals ("\033[ " . $ color . "m " . $ msg . "\033[0m " , JAXLLogger::colorize ($ msg , JAXLLogger::ERROR ));
27
-
28
- // TODO: Fix JAXL to run with @runInSeparateProcess and remove following line.
29
- JAXLLogger::$ colorize = $ current ;
30
24
}
31
25
32
26
/**
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ public function testProtocolOption()
48
48
$ config = array (
49
49
'host ' => 'domain.tld ' ,
50
50
'port ' => 5223 ,
51
- 'protocol ' => 'tcp '
51
+ 'protocol ' => 'tcp ' ,
52
+ 'strict ' => false
52
53
);
53
54
$ jaxl = new JAXL ($ config );
54
55
$ this ->assertEquals ('tcp://domain.tld:5223 ' , $ jaxl ->get_socket_path ());
@@ -57,7 +58,7 @@ public function testProtocolOption()
57
58
58
59
public function testConfig ()
59
60
{
60
- $ config = array ();
61
+ $ config = array (' strict ' => false );
61
62
$ jaxl = new JAXL ($ config );
62
63
63
64
$ this ->assertEquals ('PLAIN ' , $ jaxl ->cfg ['auth_type ' ]);
@@ -79,6 +80,6 @@ public function testConfig()
79
80
$ this ->assertNull ($ jaxl ->cfg ['protocol ' ]);
80
81
$ this ->assertNull ($ jaxl ->cfg ['resource ' ]);
81
82
$ this ->assertNull ($ jaxl ->cfg ['stream_context ' ]);
82
- $ this ->assertTrue ($ jaxl ->cfg ['strict ' ]);
83
+ $ this ->assertFalse ($ jaxl ->cfg ['strict ' ]);
83
84
}
84
85
}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ class JAXLXmlTest extends PHPUnit_Framework_TestCase
7
7
public static $ attrs = array ('attr1 ' => 'value1 ' );
8
8
9
9
/**
10
+ * @runInSeparateProcess-
10
11
* @expectedException PHPUnit_Framework_Error_Warning
11
12
*/
12
13
public function testJAXLXml_0 ()
You can’t perform that action at this time.
0 commit comments