@@ -77,7 +77,7 @@ public function test_widget_badParam()
7777
7878 public function test_setBoxPosition ()
7979 {
80- $ this ->chat ->setBoxPosition ('left ' , 'side ' , 20 , 120 );
80+ $ this ->chat ->setAlign ('left ' , 'side ' , 20 , 120 );
8181
8282 $ this ->assertEquals ('left ' , self ::getPrivateField ($ this ->chat , 'align_x ' ));
8383 $ this ->assertEquals ('side ' , self ::getPrivateField ($ this ->chat , 'align_y ' ));
@@ -91,7 +91,7 @@ public function test_setBoxPosition()
9191 */
9292 public function test_setBoxPosition_badParam ()
9393 {
94- $ this ->chat ->setBoxPosition ('foo ' , 'side ' , 20 , 120 );
94+ $ this ->chat ->setAlign ('foo ' , 'side ' , 20 , 120 );
9595 }
9696
9797 /**
@@ -100,13 +100,13 @@ public function test_setBoxPosition_badParam()
100100 */
101101 public function test_setBoxPosition_badParam2 ()
102102 {
103- $ this ->chat ->setBoxPosition ('left ' , 'foo ' , 20 , 120 );
103+ $ this ->chat ->setAlign ('left ' , 'foo ' , 20 , 120 );
104104 }
105105
106- public function test_addUserExtraInformation ()
106+ public function test_setVariable ()
107107 {
108- $ this ->chat ->addUserExtraInformation ('userId ' , 'User ID ' , 123 );
109- $ this ->chat ->addUserExtraInformation ('orderedPrice ' , 'Ordered Price in Eshop ' , '128 000 ' );
108+ $ this ->chat ->setVariable ('userId ' , 'User ID ' , 123 );
109+ $ this ->chat ->setVariable ('orderedPrice ' , 'Ordered Price in Eshop ' , '128 000 ' );
110110
111111 $ this ->assertEquals (
112112 array (
@@ -119,7 +119,8 @@ public function test_addUserExtraInformation()
119119
120120 public function test_setUserBasicInformation ()
121121 {
122- $ this ->chat ->setUserBasicInformation ('Johny Depp ' , 'johny@depp.com ' );
122+ $ this ->chat ->setName ('Johny Depp ' );
123+ $ this ->chat ->setEmail ('johny@depp.com ' );
123124
124125 $ this ->assertEquals ('Johny Depp ' , self ::getPrivateField ($ this ->chat , 'name ' ));
125126 $ this ->assertEquals ('johny@depp.com ' , self ::getPrivateField ($ this ->chat , 'email ' ));
@@ -178,15 +179,6 @@ public function test_setLanguage()
178179 $ this ->assertEquals ('cs ' , self ::getPrivateField ($ this ->chat , 'language ' ));
179180 }
180181
181- /**
182- * @expectedException \Exception
183- * @expectedExceptionMessage Language us is not allowed value. You can use only one of values: en, fr, es, de, ru, cs, sk, pl, hu, cn, da, nl, it, pt, hi, ro, no.
184- */
185- public function test_setLanguage_badParam ()
186- {
187- $ this ->chat ->setLanguage ('us ' );
188- }
189-
190182 /**
191183 * @expectedException \Exception
192184 * @expectedExceptionMessage At least KEY param must be set!
@@ -235,11 +227,12 @@ public function test_render_allParams()
235227 $ this ->chat ->setCookieDomain ('.foo.bar ' );
236228 $ this ->chat ->disableSendEmailTranscript ();
237229 $ this ->chat ->enableRating ('advanced ' , true );
238- $ this ->chat ->setBoxPosition ('left ' , 'side ' , 20 , 120 );
230+ $ this ->chat ->setAlign ('left ' , 'side ' , 20 , 120 );
239231 $ this ->chat ->setWidget ('button ' );
240- $ this ->chat ->setUserBasicInformation ('Johny Depp ' , 'johny@depp.com ' );
241- $ this ->chat ->addUserExtraInformation ('orderTotal ' , 'Total orders ' , 150 );
242- $ this ->chat ->addUserExtraInformation ('lastOrder ' , 'Last ordered ' , '2015-07-09 ' );
232+ $ this ->chat ->setName ('Johny Depp ' );
233+ $ this ->chat ->setEmail ('johny@depp.com ' );
234+ $ this ->chat ->setVariable ('orderTotal ' , 'Total orders ' , 150 );
235+ $ this ->chat ->setVariable ('lastOrder ' , 'Last ordered ' , '2015-07-09 ' );
243236 $ this ->chat ->setGoogleAnalytics ('UA-123456 ' , array ('cookieDomain ' => '.foo.bar ' ));
244237 $ this ->chat ->hideWidget ();
245238
0 commit comments