Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/Util/MbStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ public function testSubStringPreservesZeroByte(): void
#[PHPUnit\Test]
public function testPadStringAscii(): void
{
$this->assertSame('-0--Hello', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_LEFT));
$this->assertSame('Hello-0--', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_RIGHT));
$this->assertSame('-0Hello-0', $result = MbString::padString('Hello', 9, '-0-', STR_PAD_BOTH));
$this->assertSame('-0--Hello', MbString::padString('Hello', 9, '-0-', STR_PAD_LEFT));
$this->assertSame('Hello-0--', MbString::padString('Hello', 9, '-0-', STR_PAD_RIGHT));
$this->assertSame('-0Hello-0', MbString::padString('Hello', 9, '-0-', STR_PAD_BOTH));
}

/** @test */
Expand Down
4 changes: 2 additions & 2 deletions tests/Version/IPv6Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string
$this->expectException(\Darsyn\IP\Exception\InvalidIpAddressException::class);
$this->legacyExpectExceptionMessage('The IP address supplied is not valid.');
try {
$ip = IP::factory($value);
IP::factory($value);
} catch (InvalidIpAddressException $e) {
$this->assertSame($value, $e->getSuppliedIp());
throw $e;
Expand All @@ -135,7 +135,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string
public function testInstantiationFromEmbeddedIpAddress(): void
{
try {
$ip = IP::fromProtocol('12.34.56.78');
IP::fromProtocol('12.34.56.78');
$this->fail('IPv6 fromProtocol() should not accept IPv4 addresses.');
} catch (InvalidIpAddressException $e) {
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Version/MultiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function testExceptionIsThrownOnInstantiationWithInvalidAddresses(string
$this->expectException(InvalidIpAddressException::class);
$this->legacyExpectExceptionMessage('The IP address supplied is not valid.');
try {
$ip = IP::factory($value);
IP::factory($value);
} catch (InvalidIpAddressException $e) {
$this->assertSame($value, $e->getSuppliedIp());
throw $e;
Expand Down