<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yireo / magento2-integration-test-helper example snippets
declare(strict_types=1);
namespace Yireo\Example\Test\Integration;
use PHPUnit\Framework\TestCase;
use Yireo\IntegrationTestHelper\Test\Integration\Traits\AssertModuleIsEnabled;
use Yireo\IntegrationTestHelper\Test\Integration\Traits\AssertModuleIsRegistered;
use Yireo\IntegrationTestHelper\Test\Integration\Traits\AssertModuleIsRegisteredForReal;
class ModuleTest extends TestCase
{
use AssertModuleIsEnabled;
use AssertModuleIsRegistered;
use AssertModuleIsRegisteredForReal;
public function testIfModuleIsWorking()
{
$this->assertModuleIsEnabled('Yireo_Example');
$this->assertModuleIsRegistered('Yireo_Example');
$this->assertModuleIsRegisteredForReal('Yireo_Example');
}
}
declare(strict_types=1);
use Yireo\IntegrationTestHelper\Utilities\InstallConfig;
return (new InstallConfig())
->addDb('mysql80_tmpfs')
->addRedis()
->addElasticSearch('elasticsearch6')
->get();
declare(strict_types=1);
use Yireo\IntegrationTestHelper\Utilities\DisableModules;
use Yireo\IntegrationTestHelper\Utilities\InstallConfig;
$disableModules = (new DisableModules())
->disableAll()
->enableMagento()
->enableByName('Yireo_GoogleTagManager2')
->toString();
return (new InstallConfig())
->setDisableModules($disableModules)
->addDb('mysql80_tmpfs')
->addRedis()
->addElasticSearch('elasticsearch6')
->get();
MAGENTO_MODULE=Yireo_Example
MAGENTO_MODULE=Yireo_Example,Yireo_Foobar
MAGENTO_MODULE_FOLDER=app/code/Yireo/Example
$disableModules = (new DisableModules())
->disableAll()
->enableMagento()
->disableMagentoInventory()
->disableGraphQl()
->enableByPattern('Yireo_')
->toString();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.