I am trying to inject a model via Object Manager in an integration test. The injection/creation of object takes forever and never ends. However, when I try print_r before calling get/create on object manager instance, I see the dump response on the console and test ends so the issue is clearly not with the tests not running but rather with Object manager creation.
class RemoveAbandonedCartDataOlderThanAMonthCronTest extends AbstractController {
/**
* @var Abc\AbandonedCart\Cron\RemoveAbandonedCartDataOlderThanAMonthCron
*/
private $cron;
/**
* @var Magento\Framework\App\ResourceConnection
*/
private $resourceConnection;
protected function setUp() {
parent::setUp();
$this->resourceConnection = $this->_objectManager->get('Abc\AbandonedCart\Model\AbandonedCart');
}
}
magento/product-community-edition: 2.3.5
Any help would be greatly appreciated. Thanks