Apple Inc. is testing future iPhone models that replace the current Lightning charging port with the more prevalent USB-C connector, according to people with knowledge of the situation, a move that could help the company conform with looming European regulations.