Skip to content

Commit 93ae735

Browse files
committed
Clean up some ipv6 tests
1 parent 36955b0 commit 93ae735

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/React/Tests/SocketClient/ConnectorTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ public function connectionToEmptyIp6PortShouldFail()
5959
$dns = $this->createResolverMock();
6060

6161
$connector = new Connector($loop, $dns);
62-
$connector->create('::1', 9999)
63-
->then($this->expectCallableNever(), $this->expectCallableOnce());
62+
$connector
63+
->create('::1', 9999)
64+
->then($this->expectCallableNever(), $this->expectCallableOnce());
6465

6566
$loop->run();
6667
}
@@ -74,23 +75,22 @@ public function connectionToIp6TcpServerShouldSucceed()
7475

7576
$server = new Server($loop);
7677
$server->on('connection', $this->expectCallableOnce());
77-
$server->on('connection', function () use ($server, $loop) {
78-
$server->shutdown();
79-
});
78+
$server->on('connection', array($server, 'shutdown'));
8079
$server->listen(9999, '::1');
8180

8281
$dns = $this->createResolverMock();
8382

8483
$connector = new Connector($loop, $dns);
85-
$connector->create('::1', 9999)
86-
->then(function ($stream) use (&$capturedStream) {
87-
$capturedStream = $stream;
88-
$stream->end();
89-
});
84+
$connector
85+
->create('::1', 9999)
86+
->then(function ($stream) use (&$capturedStream) {
87+
$capturedStream = $stream;
88+
$stream->end();
89+
});
9090

91-
$loop->run();
91+
$loop->run();
9292

93-
$this->assertInstanceOf('React\Stream\Stream', $capturedStream);
93+
$this->assertInstanceOf('React\Stream\Stream', $capturedStream);
9494
}
9595

9696
private function createResolverMock()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy