@@ -245,13 +245,16 @@ function testParseCurrentConfig()
245
245
*
246
246
* @return void
247
247
*/
248
- function testParseScan ()
248
+ function testParseScanNoPeers ()
249
249
{
250
250
//no peers
251
251
$ arLines = array ("eth1 No scan results " );
252
252
$ arCells = $ this ->wls ->parseScan ($ arLines );
253
253
$ this ->assertEquals (0 , count ($ arCells ));
254
+ }
254
255
256
+ function testParseScanSomePeers ()
257
+ {
255
258
//some peers
256
259
//driver: ipw2200 0.21, acer travelmate 6003
257
260
$ arLines = array (
@@ -422,9 +425,10 @@ function testParseScan()
422
425
$ this ->assertEquals (array ('TKIP ' ) , $ arCells [3 ]->wpa2_group_cipher );
423
426
$ this ->assertEquals (array ('CCMP ' ) , $ arCells [3 ]->wpa2_pairwise_cipher );
424
427
$ this ->assertEquals (array ('PSK ' ) , $ arCells [3 ]->wpa2_auth_suite );
428
+ }
425
429
426
-
427
- //some other peers
430
+ function testParseScanSomeOtherPeers ()
431
+ {
428
432
//driver: ipw2100 ???, samsung x10
429
433
$ arLines = array (
430
434
"eth2 Scan completed : " ,
@@ -470,8 +474,13 @@ function testParseScan()
470
474
$ this ->assertEquals (-88 , $ arCells [0 ]->rssi );
471
475
$ this ->assertEquals (747642 , $ arCells [0 ]->beacon );
472
476
477
+ }
473
478
474
- //with ipw2200 1.0 we've got "Signal level=..." instead of "Extra: Signal"
479
+ /**
480
+ * with ipw2200 1.0 we've got "Signal level=..." instead of "Extra: Signal"
481
+ */
482
+ function testParseScanSignalLevel ()
483
+ {
475
484
$ arLines = array (
476
485
"eth1 Scan completed : " ,
477
486
" Cell 01 - Address: 00:03:C9:44:34:2C " ,
@@ -495,9 +504,13 @@ function testParseScan()
495
504
//different signal name
496
505
$ this ->assertEquals (-51 , $ arCells [0 ]->rssi );
497
506
$ this ->assertEquals (9 , $ arCells [0 ]->beacon );
507
+ }
498
508
499
-
500
- //ipw2200 1.0.1
509
+ /**
510
+ * ipw2200 1.0.1
511
+ */
512
+ function testParseScanIpw2200v101 ()
513
+ {
501
514
$ arLines = array (
502
515
"eth1 Scan completed : " ,
503
516
" Cell 01 - Address: 00:0D:BC:68:28:1A " ,
@@ -530,10 +543,13 @@ function testParseScan()
530
543
$ this ->assertEquals ('Rai Private ' , $ arCells [0 ]->ssid );
531
544
$ this ->assertEquals (-60 , $ arCells [0 ]->rssi );
532
545
$ this ->assertEquals (59 , $ arCells [0 ]->beacon );
546
+ }
533
547
534
-
535
-
536
- //ipw2100 carsten (unknown version)
548
+ /**
549
+ * ipw2100 carsten (unknown version)
550
+ */
551
+ function testParseScanUnknownSize ()
552
+ {
537
553
$ arLines = array (
538
554
'eth1 Scan completed : ' ,
539
555
' Cell 01 - Address: 00:12:D9:AC:BD:00 ' ,
@@ -563,9 +579,13 @@ function testParseScan()
563
579
$ this ->assertEquals (18 , $ arCells [0 ]->rate );
564
580
$ this ->assertEquals (array (1. ,2. ,5.5 ,6. ,9. ,11. ,12. ,18. ), $ arCells [0 ]->rates );
565
581
$ this ->assertEquals (false , $ arCells [0 ]->encryption );
582
+ }
566
583
567
-
568
- //ipw2200 kernel 2.18.1 (probably version 1.1.3)
584
+ /**
585
+ * ipw2200 kernel 2.18.1 (probably version 1.1.3)
586
+ */
587
+ function testParseScanipw2200kernel2181 ()
588
+ {
569
589
$ arLines = explode (
570
590
"\n" ,
571
591
<<<EOD
0 commit comments