You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two tests are looking identical despite description. Probably withHost in second case should be replaced by something else.
public function testUriDoesNotAppendColonToHostIfPortIsEmpty()
{
$uri = (new Uri())->withHost('google.com');
$this->assertSame('//google.com', (string) $uri);
}
public function testAuthorityIsPrefixedByDoubleSlashIfPresent()
{
$uri = (new Uri())->withHost('example.com');
$this->assertSame('//example.com', (string) $uri);
}
Tests body looks similar but they are not the same.
If either of expectations breaks both tests will fail but test names describe the expectation which in turn allows to properly interpret failure and to refactor test with same expectation but different code if needed.
Two tests are looking identical despite description. Probably withHost in second case should be replaced by something else.
Originally posted by @Keksov at zendframework/zend-diactoros#381
The text was updated successfully, but these errors were encountered: