Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
482 B

<?php
/**
* TextTest class.
*/
namespace Friendica\Test;
use Friendica\Model\Group;
4 years ago
use PHPUnit\Framework\TestCase;
/**
* Tests for text functions.
*/
4 years ago
class TextTest extends TestCase
{
/**
* test hex2bin and reverse
*/
public function testHex2Bin()
{
$this->assertEquals(-3, hex2bin(bin2hex(-3)));
$this->assertEquals(0, hex2bin(bin2hex(0)));
$this->assertEquals(12, hex2bin(bin2hex(12)));
$this->assertEquals(PHP_INT_MAX, hex2bin(bin2hex(PHP_INT_MAX)));
}
}