cancel
Showing results for 
Search instead for 
Did you mean: 

I need to override Magento/FunctionalTestingFramework/Util/ModuleResolver/ModuleResolverService.php

I need to override Magento/FunctionalTestingFramework/Util/ModuleResolver/ModuleResolverService.php

I was trying to override the Class Magento/FunctionalTestingFramework/DataTransport/Auth/WebApiAuth.php function getAdminToken() but this particular function is a static function so it can't be override so I tried overriding the class Magento/FunctionalTestingFramework/Util/ModuleResolver/ModuleResolverService.php from where this function getAdminToken() is called so that I can call the function getAdminToken() of my custom class WebApiAuth.php. I tried overriding the class by preference

but the class is not getting override ,I need to make change in this function
public function getAdminToken(): string rather than calling the function getAdminToken() of class Magento\FunctionalTestingFramework\DataTransport\Auth\WebApiAuth; I want to call my custom file.

 

I tried using the preference but was unable to get die inside my custom file when I am running the command in the Terminal

php -d memory_limit=-1 vendor/bin/mftf generate:tests AdminLoginSuccessfulTest,

it is getting die in the core file but not in my custom override file.