Ejemplo n.º 1
0
 public function testItShouldReturnPassedDataIfNoAvailableHydratorsFound()
 {
     $this->hydrator1->method('canHydrate')->willReturn(false);
     $this->hydrator1->expects($this->never())->method('hydrate');
     $this->hydrator2->method('canHydrate')->willReturn(false);
     $this->hydrator2->expects($this->never())->method('hydrate');
     $this->hydrator->add($this->hydrator1);
     $this->hydrator->add($this->hydrator2);
     $result = $this->hydrator->hydrate(array(1, 2, 3), new \stdClass());
     $this->assertSame(array(1, 2, 3), $result);
 }