2727
2828class FactoriesTest extends TestCase
2929{
30- public function testRequestFactory ()
30+ public function test_RequestFactory ()
3131 {
3232 $ factory = new Factory \RequestFactory ();
3333 $ this ->assertInstanceOf (Request::class, $ factory ->createRequest ('GET ' , 'http://example.com ' ));
3434 }
3535
36- public function testServerRequestFactory ()
36+ public function test_ServerRequestFactory ()
3737 {
3838 $ factory = new Factory \ServerRequestFactory ();
3939 $ this ->assertInstanceOf (ServerRequest::class, $ factory ->createServerRequest ('POST ' , 'http://example.com ' ));
4040 }
4141
42- public function testResponseFactory ()
42+ public function test_ResponseFactory ()
4343 {
4444 $ factory = new Factory \ResponseFactory ();
4545 $ this ->assertInstanceOf (Response::class, $ factory ->createResponse ());
4646 }
4747
48- public function testStreamFactory ()
48+ public function test_StreamFactory ()
4949 {
5050 $ factory = new Factory \StreamFactory ();
5151 $ this ->assertInstanceOf (Stream::class, $ factory ->createStream ('contents ' ));
5252 $ this ->assertInstanceOf (Stream::class, $ factory ->createStreamFromFile ('php://temp ' ));
5353 $ this ->assertInstanceOf (Stream::class, $ factory ->createStreamFromResource (fopen ('php://temp ' , 'w+b ' )));
5454 }
5555
56- public function testInvalidStreamMode_ThrowsException ()
56+ public function test_InvalidStreamMode_ThrowsException ()
5757 {
5858 $ factory = new Factory \StreamFactory ();
5959 $ this ->expectException (InvalidArgumentException::class);
6060 $ this ->assertInstanceOf (Stream::class, $ factory ->createStreamFromFile ('someFile.txt ' , 'invalid ' ));
6161 }
6262
63- public function testInvalidStreamFilename_ThrowsException ()
63+ public function test_InvalidStreamFilename_ThrowsException ()
6464 {
6565 $ factory = new Factory \StreamFactory ();
6666 $ this ->expectException (RuntimeException::class);
6767 $ this ->assertInstanceOf (Stream::class, $ factory ->createStreamFromFile ('not-A-File.txt ' ));
6868 }
6969
70- public function testUploadedFileFactory ()
70+ public function test_UploadedFileFactory ()
7171 {
7272 $ factory = new Factory \UploadedFileFactory ();
7373 $ this ->assertInstanceOf (UploadedFile::class, $ instance = $ factory ->createUploadedFile (new FakeStream ()));
@@ -82,7 +82,7 @@ public function testUploadedFileFactory()
8282 $ this ->assertEquals (NonSAPIUploadedFile::class, get_class ($ instance ));
8383 }
8484
85- public function testUnreadableFileStream_ThrowsException ()
85+ public function test_UnreadableFileStream_ThrowsException ()
8686 {
8787 $ stream = new FakeStream ();
8888 $ stream ->readable = false ;
@@ -92,13 +92,13 @@ public function testUnreadableFileStream_ThrowsException()
9292 $ factory ->createUploadedFile ($ stream );
9393 }
9494
95- public function testUriFactory ()
95+ public function test_UriFactory ()
9696 {
9797 $ factory = new Factory \UriFactory ();
9898 $ this ->assertInstanceOf (Uri::class, $ factory ->createUri ('https://www.example.com ' ));
9999 }
100100
101- public function testMalformedUri_ThrowsException ()
101+ public function test_MalformedUri_ThrowsException ()
102102 {
103103 $ factory = new Factory \UriFactory ();
104104 $ this ->expectException (InvalidArgumentException::class);
0 commit comments