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