tmpfile
reactphp/event-loop
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Creates a temporary file
tmpfile
():
resource
|
false
public function
testStaticAddReadStreamCallsAddReadStreamOnLoopInstance
()
{
$stream
=
tmpfile
();
$listener
= function () { };
$loop
=
$this
->
getMockBuilder
(
'React\EventLoop\LoopInterface'
)->
getMock
();
tests/LoopTest.php
public function
testStaticAddWriteStreamCallsAddWriteStreamOnLoopInstance
()
{
$stream
=
tmpfile
();
$listener
= function () { };
$loop
=
$this
->
getMockBuilder
(
'React\EventLoop\LoopInterface'
)->
getMock
();
tests/LoopTest.php
public function
testStaticRemoveReadStreamCallsRemoveReadStreamOnLoopInstance
()
{
$stream
=
tmpfile
();
$loop
=
$this
->
getMockBuilder
(
'React\EventLoop\LoopInterface'
)->
getMock
();
$loop
->
expects
(
$this
->
once
())->
method
(
'removeReadStream'
)->
with
(
$stream
);
tests/LoopTest.php
public function
testStaticRemoveWriteStreamCallsRemoveWriteStreamOnLoopInstance
()
{
$stream
=
tmpfile
();
$loop
=
$this
->
getMockBuilder
(
'React\EventLoop\LoopInterface'
)->
getMock
();
$loop
->
expects
(
$this
->
once
())->
method
(
'removeWriteStream'
)->
with
(
$stream
);
tests/LoopTest.php