assertMatchesRegularExpression('/^[A-Za-z0-9\-_]+$/', $encoded); // Assert that decoding the encoded string returns the original data $decoded = base64url_decode($encoded); $this->assertEquals($data, $decoded); } }