public function testGetBytes() { $bitString = new BitString(26); $bitString->setBitsHighToLow(25, '0111111110000000011110000'); $bytes = $bitString->getBytes(24, 3); // Should be 3 bytes. $this->assertEquals(3, sizeof($bytes)); $this->assertEquals(255, $bytes[0]); $this->assertEquals(0, $bytes[1]); $this->assertEquals(240, $bytes[2]); }