Kraken\_Unit\Channel\Model\Socket\SocketTest::createModel PHP Method

createModel() public method

public createModel ( mixed[] $params = [], string[] | null $methods = null ) : Socket | PHPUnit_Framework_MockObject_MockObject
$params mixed[]
$methods string[] | null
return Kraken\Channel\Model\Socket\Socket | PHPUnit_Framework_MockObject_MockObject
    public function createModel($params = [], $methods = null)
    {
        $params = array_merge(['id' => 'model', 'endpoint' => 'tcp://127.0.0.1:2080', 'type' => $params['type'], 'host' => 'model'], $params);
        $loop = $this->getMock(Loop::class, $methods, [], '', false);
        $model = $this->getMock(Socket::class, $methods, [$loop, $params]);
        $this->model = $model;
        return $model;
    }