PHP Classes

File: tests/socket-tests/ServerSocketTest.php

Recommend this page to a friend!
  Classes of Maik Greubel   PHP Generics   tests/socket-tests/ServerSocketTest.php   Download  
File: tests/socket-tests/ServerSocketTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP Generics
Framework for accessing streams, sockets and logs
Author: By
Last change: Update of tests/socket-tests/ServerSocketTest.php
Date: 7 months ago
Size: 528 bytes
 

Contents

Class file image Download
<?php

namespace Generics\Tests;

use
Generics\Socket\Endpoint;
use
Generics\Socket\ServerSocket;

class
ServerSocketTest extends \PHPUnit\Framework\TestCase
{

    public function
testServerSocket()
    {
       
$serverEndpoint = new Endpoint('127.0.0.1', 5555);
       
$server = new ServerSocket($serverEndpoint);

       
// currently we are not able to test a server socket using phpunit... :-(
        // $server->serve( new TestServiceCallback( $serverEndpoint ) );
       
$this->assertTrue($server->isOpen());
    }
}