FixedUriConnectorTest.php 492 B

123456789101112131415161718
  1. <?php
  2. namespace React\Tests\Socket;
  3. use React\Socket\FixedUriConnector;
  4. class FixedUriConnectorTest extends TestCase
  5. {
  6. public function testWillInvokeGivenConnector()
  7. {
  8. $base = $this->getMockBuilder('React\Socket\ConnectorInterface')->getMock();
  9. $base->expects($this->once())->method('connect')->with('test')->willReturn('ret');
  10. $connector = new FixedUriConnector('test', $base);
  11. $this->assertEquals('ret', $connector->connect('ignored'));
  12. }
  13. }