@@ -22,7 +22,7 @@ public static function setUpBeforeClass(): void
2222 self ::$ api = new HabboAPI (self ::$ parser );
2323 }
2424
25- public function testTheSystem ()
25+ public function testTheSystem (): void
2626 {
2727 // Don't run system tests on Travis
2828 if (getenv ('TRAVIS ' ) == "true " ) {
@@ -59,19 +59,17 @@ public function testTheSystem()
5959 $ profile = self ::$ api ->getProfile ('hhus-e6d805c82fcd7f4717f4bff5f9f437ae ' );
6060
6161 // Test a badge
62+ $ badge = null ;
6263 $ badges = $ profile ->getBadges ();
63- $ badge = $ badges [0 ];
64+ foreach ($ badges as $ b ) {
65+ if ($ b ->getCode () == "ACH_RespectEarned1 " ) {
66+ $ badge = $ b ;
67+ }
68+ }
6469 $ this ->assertEquals ("ACH_RespectEarned1 " , $ badge ->getCode ());
65- $ this ->assertEquals ("10% Respected Habbo I " , $ badge ->getName ());
70+ $ this ->assertEquals ("Respected Habbo I " , $ badge ->getName ());
6671 $ this ->assertEquals ("For earning respect 1 time. " , $ badge ->getDescription ());
6772
68- // Test a friend
69- $ friends = $ profile ->getFriends ();
70- $ friend = $ friends [0 ];
71- $ this ->assertEquals ('hhus-fa1ff34dd0562488af72aef00f958e0e ' , $ friend ->getId ());
72- $ this ->assertEquals ('Snupdapup ' , $ friend ->getHabboName ());
73- $ this ->assertEquals ('hr-540-34.hd-600-8.ch-884-76.lg-3216-1408.sh-730-1408.he-3274-1408.ca-1802 ' , $ friend ->getFigureString ());
74-
7573 // Test a group
7674 $ groups = $ profile ->getGroups ();
7775 $ group = $ groups [0 ];
@@ -100,7 +98,7 @@ public function testTheSystem()
10098 $ counts = $ profile ->getCounts ();
10199 $ this ->assertEquals (1 , $ counts ['habbo ' ]);
102100 $ this ->assertEquals (15 , $ counts ['badges ' ]);
103- $ this ->assertEquals (1 , $ counts ['friends ' ]);
101+ $ this ->assertEquals (0 , $ counts ['friends ' ]); // Habbo deleted my only friend! :(
104102 $ this ->assertEquals (1 , $ counts ['groups ' ]);
105103 $ this ->assertEquals (2 , $ counts ['rooms ' ]);
106104
0 commit comments