@@ 54-68 (lines=15) @@ | ||
51 | ||
52 | $ticks = 0; |
|
53 | ||
54 | while (true) { |
|
55 | $this->server->tick(); |
|
56 | ||
57 | // the listener should have incremented this |
|
58 | ||
59 | if ($store === 1) { |
|
60 | break; |
|
61 | } |
|
62 | ||
63 | if (++$ticks >= 3) { |
|
64 | $this->fail(); |
|
65 | } |
|
66 | ||
67 | sleep(1); |
|
68 | } |
|
69 | ||
70 | $this->server->removeListener("foo", $listener); |
|
71 | ||
@@ 76-90 (lines=15) @@ | ||
73 | ||
74 | $ticks = 0; |
|
75 | ||
76 | while (true) { |
|
77 | $this->server->tick(); |
|
78 | ||
79 | // the listener should not have incremented this, because it's gone! |
|
80 | ||
81 | if ($store === 1) { |
|
82 | break; |
|
83 | } |
|
84 | ||
85 | if (++$ticks >= 3) { |
|
86 | $this->fail(); |
|
87 | } |
|
88 | ||
89 | sleep(1); |
|
90 | } |
|
91 | } |
|
92 | ||
93 | /** |