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: Code cleanup
Fix for assertion in test
Fix risky testing and documentation
Update to PHPUnit 6
Date: 3 years 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());
    }
}


For more information send a message to info at phpclasses dot org.