/** * Checks that binary string representations are correctly generated. */ public function testBinaryString() { $bitString = new BitString(10); $bitString->setBit(3, true); $bitString->setBit(7, true); $bitString->setBit(8, true); $string = $bitString->toBinaryString(); // Testing with leading zero to make sure it isn't omitted. $this->assertEquals("0110001000", $string); }