I am reading the book "Introduction to Calculus of Variations" by Bernard Dacorogna, and on chapter 1.4 of Sobolev Spaces, in example 1.29 it is shown that the Heaviside function
\begin{equation*} H(x)=\left\{\begin{array}{cc} 1 & \text { if } x>0 \\ 0 & \text { if } x \leq 0 \end{array}\right. \end{equation*}
has no weak derivative in, say, $\Omega=]-1,1[$. I understand the proof, but I'm confused at the end of the following step:
Assume, for the sake of contradiction, that $H'=\delta \in L^1_{loc}(\Omega)$ and let us prove that we reach a contradiction. Let $\varphi \in C^{\infty}_0(]0,1[)$ be arbitrary and extend it to $]-1,0[$ by $\varphi\equiv 0$. We therefore have by definition that \begin{equation*} \begin{aligned} \int_{-1}^1 \delta(x) \varphi(x) d x & =-\int_{-1}^1 H(x) \varphi^{\prime}(x) d x=-\int_0^1 \varphi^{\prime}(x) d x \\ & =\varphi(0)-\varphi(1)=0. \end{aligned} \end{equation*}
What confuses me is the last equality: why must $\varphi(0)=\varphi(1)$ if $\varphi \in C^{\infty}_0(]0,1[)$? For example, $\varphi(x)=x, x \in]0,1[$ would be in $C^{\infty}_0(]0,1[)$, but $\varphi(0)\neq \varphi(1)$.