22
33include_once __DIR__ . '/LoggerAwareTestCase.php ' ;
44
5+ use PhpXmlRpc \Encoder ;
6+ use PhpXmlRpc \Helper \XMLParser ;
7+ use PhpXmlRpc \Request ;
8+ use PhpXmlRpc \Value ;
9+
510/**
611 * Tests involving the Value class.
712 * NB: these tests do not involve the parsing of xml into Value objects - look in 04ParsingTest for that
@@ -170,7 +175,7 @@ public function testArrayAccess()
170175 }
171176 }
172177
173- $ v2 = new \ PhpXmlRpc \ Value (array (new \ PhpXmlRpc \ Value ('one ' ), new \ PhpXmlRpc \ Value ('two ' )), 'array ' );
178+ $ v2 = new Value (array (new Value ('one ' ), new Value ('two ' )), 'array ' );
174179 $ this ->assertequals (2 , count ($ v2 ));
175180 $ out = array (array ('key ' => 0 , 'value ' => 'object ' ), array ('key ' => 1 , 'value ' => 'object ' ));
176181 $ i = 0 ;
@@ -182,7 +187,7 @@ public function testArrayAccess()
182187 $ i ++;
183188 }
184189
185- $ v3 = new \ PhpXmlRpc \ Value (10 , 'i4 ' );
190+ $ v3 = new Value (10 , 'i4 ' );
186191 $ this ->assertEquals (1 , count ($ v3 ));
187192 $ this ->assertEquals (true , isset ($ v3 ['int ' ]));
188193 $ this ->assertEquals (true , isset ($ v3 ['i4 ' ]));
@@ -196,7 +201,7 @@ public function testArrayAccess()
196201 $ this ->assertEquals (1000 , $ v3 ['i4 ' ]);
197202 }
198203
199- /// @todo do not use \PhpXmlRpc\ Encoder for this test
204+ /// @todo do not use Encoder for this test
200205 public function testBigXML ()
201206 {
202207 // nb: make sure that the serialized xml corresponding to this is > 10MB in size
@@ -205,11 +210,11 @@ public function testBigXML()
205210 $ data [] = 'hello world ' ;
206211 }
207212
208- $ encoder = new \ PhpXmlRpc \ Encoder ();
213+ $ encoder = new Encoder ();
209214 $ val = $ encoder ->encode ($ data );
210- $ req = new \ PhpXmlRpc \ Request ('test ' , array ($ val ));
215+ $ req = new Request ('test ' , array ($ val ));
211216 $ xml = $ req ->serialize ();
212- $ parser = new \ PhpXmlRpc \ Helper \ XMLParser ();
217+ $ parser = new XMLParser ();
213218 $ _xh = $ parser ->parse ($ xml );
214219
215220 $ this ->assertequals (0 , $ _xh ['isf ' ]);
@@ -222,7 +227,7 @@ public function testLatin15InternalEncoding()
222227 }
223228
224229 $ string = chr (164 );
225- $ v = new \ PhpXmlRpc \ Value ($ string );
230+ $ v = new Value ($ string );
226231
227232 $ originalEncoding = \PhpXmlRpc \PhpXmlRpc::$ xmlrpc_internalencoding ;
228233 \PhpXmlRpc \PhpXmlRpc::$ xmlrpc_internalencoding = 'ISO-8859-15 ' ;
0 commit comments