Let $X(t)$ be any deterministic $T$ periodic function, then
$$M(t)=\int_0^T X(s) ds=\operatorname{Const},$$
but $X(t)$ is not a martingale.
Let $X(t)$ be any deterministic $T$ periodic function, then
$$M(t)=\int_0^T X(s) ds=\operatorname{Const},$$
but $X(t)$ is not a martingale.