Skip to content

Commit 08cf429

Browse files
authored
Merge pull request #270 from carusogabriel/refatoring-tests
Refactoring tests
2 parents c09912f + fef6ad4 commit 08cf429

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

tests/Io/HttpBodyStreamTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ public function testToString()
8888

8989
public function testDetach()
9090
{
91-
$this->assertEquals(null, $this->bodyStream->detach());
91+
$this->assertNull($this->bodyStream->detach());
9292
}
9393

9494
public function testGetSizeDefault()
9595
{
96-
$this->assertEquals(null, $this->bodyStream->getSize());
96+
$this->assertNull($this->bodyStream->getSize());
9797
}
9898

9999
public function testGetSizeCustom()
@@ -146,7 +146,7 @@ public function testGetContents()
146146

147147
public function testGetMetaData()
148148
{
149-
$this->assertEquals(null, $this->bodyStream->getMetadata());
149+
$this->assertNull($this->bodyStream->getMetadata());
150150
}
151151

152152
public function testIsReadable()

tests/Io/MultipartParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ public function testInvalidUploadFileWithoutContentTypeUsesNullValue()
593593
$file = $files['file'];
594594

595595
$this->assertSame('hello.txt', $file->getClientFilename());
596-
$this->assertSame(null, $file->getClientMediaType());
596+
$this->assertNull($file->getClientMediaType());
597597
$this->assertSame(5, $file->getSize());
598598
$this->assertSame(UPLOAD_ERR_OK, $file->getError());
599599
$this->assertSame('world', (string)$file->getStream());

tests/Io/ServerRequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testGetDefaultAttribute()
4040
$request = $this->request->withAttribute('hello', 'world');
4141

4242
$this->assertNotSame($request, $this->request);
43-
$this->assertEquals(null, $request->getAttribute('hi', null));
43+
$this->assertNull($request->getAttribute('hi', null));
4444
}
4545

4646
public function testWithoutAttribute()

tests/StreamingServerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function testRequestGetWithHostAndDefaultPortWillBeIgnored()
191191
$this->assertSame('/', $requestAssertion->getRequestTarget());
192192
$this->assertSame('/', $requestAssertion->getUri()->getPath());
193193
$this->assertSame('http://example.com/', (string)$requestAssertion->getUri());
194-
$this->assertSame(null, $requestAssertion->getUri()->getPort());
194+
$this->assertNull($requestAssertion->getUri()->getPort());
195195
$this->assertSame('example.com', $requestAssertion->getHeaderLine('Host'));
196196
}
197197

@@ -290,7 +290,7 @@ public function testRequestConnectAuthorityFormWithDefaultPortWillBeIgnored()
290290
$this->assertSame('example.com:80', $requestAssertion->getRequestTarget());
291291
$this->assertSame('', $requestAssertion->getUri()->getPath());
292292
$this->assertSame('http://example.com', (string)$requestAssertion->getUri());
293-
$this->assertSame(null, $requestAssertion->getUri()->getPort());
293+
$this->assertNull($requestAssertion->getUri()->getPort());
294294
$this->assertSame('example.com', $requestAssertion->getHeaderLine('Host'));
295295
}
296296

@@ -312,7 +312,7 @@ public function testRequestConnectAuthorityFormNonMatchingHostWillBeOverwritten(
312312
$this->assertSame('example.com:80', $requestAssertion->getRequestTarget());
313313
$this->assertSame('', $requestAssertion->getUri()->getPath());
314314
$this->assertSame('http://example.com', (string)$requestAssertion->getUri());
315-
$this->assertSame(null, $requestAssertion->getUri()->getPort());
315+
$this->assertNull($requestAssertion->getUri()->getPort());
316316
$this->assertSame('example.com', $requestAssertion->getHeaderLine('Host'));
317317
}
318318

0 commit comments

Comments
 (0)