6
6
use PHPUnit \Framework \TestCase ;
7
7
use React \Promise \Promise ;
8
8
use React \Promise \Deferred ;
9
- use React \Http \Browser ;
10
9
use React \Http \Io \ReadableBodyStream ;
11
10
use React \Stream \ThroughStream ;
11
+ use ReflectionProperty ;
12
12
use RingCentral \Psr7 \Response ;
13
13
14
14
class EventSourceTest extends TestCase
@@ -53,7 +53,7 @@ public function testConstructorCanBeCalledWithoutBrowser()
53
53
$ this ->assertInstanceOf ('React\Http\Browser ' , $ browser );
54
54
}
55
55
56
-
56
+
57
57
public function testConstructorCanBeCalledWithoutCustomHeaders ()
58
58
{
59
59
$ loop = $ this ->getMockBuilder ('React\EventLoop\LoopInterface ' )->getMock ();
@@ -67,7 +67,7 @@ public function testConstructorCanBeCalledWithoutCustomHeaders()
67
67
$ ref = new ReflectionProperty ($ es , 'defaultHeaders ' );
68
68
$ ref ->setAccessible (true );
69
69
$ defaultHeaders = $ ref ->getValue ($ es );
70
-
70
+
71
71
$ this ->assertEquals ($ defaultHeaders , $ headers );
72
72
}
73
73
@@ -86,8 +86,8 @@ public function testConstructorCanBeCalledWithCustomHeaders()
86
86
$ ref ->setAccessible (true );
87
87
$ headers = $ ref ->getValue ($ es );
88
88
89
- // Could have used the defaultHeaders property on EventSource,
90
- // but this ensures the defaults are not altered by hardcoding their values in this test
89
+ // Could have used the defaultHeaders property on EventSource,
90
+ // but this ensures the defaults are not altered by hardcoding their values in this test
91
91
$ this ->assertEquals (array (
92
92
'Accept ' => 'text/event-stream ' ,
93
93
'Cache-Control ' => 'no-cache ' ,
0 commit comments