Skip to content

Commit

Permalink
replace deprecated exception annotations in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rimelek committed Mar 18, 2023
1 parent 4097569 commit 30505fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions test/IPv4AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ public function testGetHighOrderBitsOfIPv4Class()
$this->assertEquals('1111', IPv4Address::getHighOrderBitsOfIPv4Class('E'));
}

/**
* @expectedException \Exception
*/
public function testGetHighOrderBitsOfIPv4ClassException()
{
$this->expectException(\Exception::class);
IPv4Address::getHighOrderBitsOfIPv4Class('F');
}

Expand Down
4 changes: 1 addition & 3 deletions test/IPv6AddressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ public function testToIPv4()
$this->assertEquals("\x7f\x00\x00\x01", $ip->toIPv4()->toBinary());
}

/**
* @expectedException \Exception
*/
public function testToIPv4Exception()
{
$this->expectException(\Exception::class);
$ip = IPv6Address::fromBinary("\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x7f\x00\x00\x01");
$ip->toIPv4();
}
Expand Down

0 comments on commit 30505fa

Please sign in to comment.