diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2019-11-01 22:01:26 +0100 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2019-11-01 22:01:26 +0100 |
| commit | 912eb28223c937a679bd2c78ea139033f7796b26 (patch) | |
| tree | d7b119bb5627d0814a0177070bf12ba15c939f15 /tests | |
| parent | ce35aa8b0b90870608a5b0782a36c6aedad8c7e4 (diff) | |
| parent | 00682db8a625e40f720c513c72267395c4354766 (diff) | |
| download | forums-912eb28223c937a679bd2c78ea139033f7796b26.tar forums-912eb28223c937a679bd2c78ea139033f7796b26.tar.gz forums-912eb28223c937a679bd2c78ea139033f7796b26.tar.bz2 forums-912eb28223c937a679bd2c78ea139033f7796b26.tar.xz forums-912eb28223c937a679bd2c78ea139033f7796b26.zip | |
Merge pull request #5718 from rubencm/ticket/16189
[ticket/16189] Deprecate inet_ntop and inet_pton wrappers
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/network/inet_ntop_pton_test.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/network/inet_ntop_pton_test.php b/tests/network/inet_ntop_pton_test.php deleted file mode 100644 index dbd58ce783..0000000000 --- a/tests/network/inet_ntop_pton_test.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** -* -* This file is part of the phpBB Forum Software package. -* -* @copyright (c) phpBB Limited <https://www.phpbb.com> -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -class phpbb_network_inet_ntop_pton_test extends phpbb_test_case -{ - public function data_provider() - { - return array( - array('127.0.0.1', '7f000001'), - array('192.232.131.223', 'c0e883df'), - array('13.1.68.3', '0d014403'), - array('129.144.52.38', '81903426'), - - array('2001:280:0:10::5', '20010280000000100000000000000005'), - array('fe80::200:4cff:fefe:172f', 'fe8000000000000002004cfffefe172f'), - - array('::', '00000000000000000000000000000000'), - array('::1', '00000000000000000000000000000001'), - array('1::', '00010000000000000000000000000000'), - - array('1:1:0:0:1::', '00010001000000000001000000000000'), - - array('0:2:3:4:5:6:7:8', '00000002000300040005000600070008'), - array('1:2:0:4:5:6:7:8', '00010002000000040005000600070008'), - array('1:2:3:4:5:6:7:0', '00010002000300040005000600070000'), - - array('2001:0:0:1::1', '20010000000000010000000000000001'), - ); - } - - /** - * @dataProvider data_provider - */ - public function test_inet_ntop($address, $hex) - { - $this->assertEquals($address, phpbb_inet_ntop(pack('H*', $hex))); - } - - /** - * @dataProvider data_provider - */ - public function test_inet_pton($address, $hex) - { - $this->assertEquals($hex, bin2hex(phpbb_inet_pton($address))); - } -} |
