Ejemplo n.º 1
0
 function testObject()
 {
     $this->assert(Argument::object(\DateTime::class)->accepts(new ExactArgument(new \DateTime())));
     $this->assert(Argument::object(\DateTime::class)->accepts(new ObjectArgument(\DateTime::class)));
     $this->assert(Argument::object(\DateTimeInterface::class)->accepts(new ObjectArgument(\DateTime::class)));
     $this->assert->not(Argument::object(\DateTime::class)->accepts(new ObjectArgument(\DateTimeInterface::class)));
 }