| @@ 76-91 (lines=16) @@ | ||
| 73 | * Verify that the number of added events to the event listener from the abstract hydrator class is equal to the  | 
                                |
| 74 | * number of removed events  | 
                                |
| 75 | */  | 
                                |
| 76 | public function testOnClearEventListenerIsDetachedOnCleanup() : void  | 
                                |
| 77 |     { | 
                                |
| 78 | $this  | 
                                |
| 79 | ->mockEventManager  | 
                                |
| 80 | ->expects(self::at(0))  | 
                                |
| 81 |             ->method('addEventListener') | 
                                |
| 82 | ->with([Events::onClear], $this->hydrator);  | 
                                |
| 83 | ||
| 84 | $this  | 
                                |
| 85 | ->mockEventManager  | 
                                |
| 86 | ->expects(self::at(1))  | 
                                |
| 87 |             ->method('removeEventListener') | 
                                |
| 88 | ->with([Events::onClear], $this->hydrator);  | 
                                |
| 89 | ||
| 90 | iterator_to_array($this->hydrator->iterate($this->mockStatement, $this->mockResultMapping));  | 
                                |
| 91 | }  | 
                                |
| 92 | ||
| 93 | /**  | 
                                |
| 94 | * @group #6623  | 
                                |
| @@ 96-111 (lines=16) @@ | ||
| 93 | /**  | 
                                |
| 94 | * @group #6623  | 
                                |
| 95 | */  | 
                                |
| 96 | public function testHydrateAllRegistersAndClearsAllAttachedListeners() : void  | 
                                |
| 97 |     { | 
                                |
| 98 | $this  | 
                                |
| 99 | ->mockEventManager  | 
                                |
| 100 | ->expects(self::at(0))  | 
                                |
| 101 |             ->method('addEventListener') | 
                                |
| 102 | ->with([Events::onClear], $this->hydrator);  | 
                                |
| 103 | ||
| 104 | $this  | 
                                |
| 105 | ->mockEventManager  | 
                                |
| 106 | ->expects(self::at(1))  | 
                                |
| 107 |             ->method('removeEventListener') | 
                                |
| 108 | ->with([Events::onClear], $this->hydrator);  | 
                                |
| 109 | ||
| 110 | $this->hydrator->hydrateAll($this->mockStatement, $this->mockResultMapping);  | 
                                |
| 111 | }  | 
                                |
| 112 | }  | 
                                |
| 113 | ||