public function testHydratorEncapsulation() { $table = new Table(); $hydrator = $this->getMock('Zend\\Stdlib\\Hydrator\\HydratorInterface'); $result = $table->setHydrator($hydrator); $this->assertSame($table, $result); $result = $table->getHydrator(); $this->assertSame($hydrator, $result); }