The phase error, or the pollution effect in the finite element solution of wave propagation problems, is a well known phenomenon that must be confronted when solving problems in the high-frequency range. This paper presents a new method with no phase errors for one-dimensional (1D) time-harmonic wave propagation problems using new ideas that hold promise for the multidimensional case. The method is constructed within the framework of the discontinuous Petrov-Galerkin (DPG) method with optimal test functions. We have previously shown that such methods select solutions that are the best possible approximations in an energy norm dual to any selected test space norm. In this paper, we advance by asking what is the optimal test space norm that achieves error reduction in a given energy norm. This is answered in the specific case of the Helmholtz equation with L2-norm as the energy norm. We obtain uniform stability with respect to the wave number. We illustrate the method with a number of 1D numerical experiments, using discontinuous piecewise polynomial hp spaces for the trial space and its corresponding optimal test functions computed approximately and locally. A 1D theoretical stability analysis is also developed.