Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,12 +7,14 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Tcpclient;
|
||||
|
||||
/** Test the TCP client */
|
||||
class tcpclientTest extends \PHPUnit_Framework_TestCase
|
||||
class TcpclientTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_GoogleIPv4 ()
|
||||
{
|
||||
$tcpclient = new \tcpclient ("www.google.fr", 80);
|
||||
$tcpclient = new Tcpclient ("www.google.fr", 80);
|
||||
$tcpclient->preferIPv4 (true);
|
||||
$tcpclient->connect ();
|
||||
$tcpclient->send ("GET / HTTP/1.1\r\n".
|
||||
@@ -29,7 +31,7 @@ class tcpclientTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_GoogleIPv4orIpv6 ()
|
||||
{
|
||||
$tcpclient = new \tcpclient ("www.google.fr", 80);
|
||||
$tcpclient = new Tcpclient ("www.google.fr", 80);
|
||||
$tcpclient->connect ();
|
||||
$tcpclient->send ("GET / HTTP/1.1\r\n".
|
||||
"Host: www.google.fr\r\n".
|
||||
@@ -45,7 +47,7 @@ class tcpclientTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_GoogleSSL ()
|
||||
{
|
||||
$tcpclient = new \tcpclient ("www.google.fr", 443);
|
||||
$tcpclient = new Tcpclient ("www.google.fr", 443);
|
||||
$tcpclient->connect ();
|
||||
$tcpclient->cryptoEnable (true);
|
||||
$tcpclient->send ("GET / HTTP/1.1\r\n".
|
||||
@@ -62,7 +64,7 @@ class tcpclientTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function test_GoogleSSLIPv6 ()
|
||||
{
|
||||
$tcpclient = new \tcpclient ("ipv6.google.com", 443);
|
||||
$tcpclient = new Tcpclient ("ipv6.google.com", 443);
|
||||
$tcpclient->connect ();
|
||||
$tcpclient->cryptoEnable (true);
|
||||
$tcpclient->send ("GET / HTTP/1.1\r\n".
|
||||
|
||||
Reference in New Issue
Block a user