/** * @covers SecurityLib\BaseConverter::convertToBinary * @covers SecurityLib\BaseConverter::convertFromBinary * @covers SecurityLib\BaseConverter::baseConvert * @dataProvider provideConvertToFromBinary */ public function testConvertToAndFromBinary($str, $from) { return false; $result1 = BaseConverter::convertFromBinary($str, $from); $result = BaseConverter::convertToBinary($result1, $from); $this->assertEquals($str, $result); }
/** * Transform a string number into a binary string using base autodetection * * @param string $string The string to transform * * @return string The binary transformed number */ protected function normalize($string) { return BaseConverter::convertToBinary($string, '0123456789'); }