/** * @return void */ public function testFilterByRequestType() { $requestType = 3; $this->collectionMock->expects($this->once())->method('addFieldToFilter')->with('request_type', $requestType)->willReturnSelf(); $this->assertEquals($this->collectionMock, $this->collectionMock->filterByRequestType($requestType)); }
/** * filterByRequestType() test * * @magentoDataFixture Magento/Security/_files/password_reset_request_events.php */ public function testFilterByRequestType() { $this->collectionModel->filterByRequestType(\Magento\Security\Model\PasswordResetRequestEvent::ADMIN_PASSWORD_RESET_REQUEST)->load(); $this->assertGreaterThanOrEqual(3, $this->collectionModel->getSize()); }