PHP code example of yireo / shopware6-integration-test-helper

1. Go to this page and download the library: Download yireo/shopware6-integration-test-helper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yireo / shopware6-integration-test-helper example snippets


namespace Swag\Example\Test\Integration;

use Yireo\IntegrationTestHelper\Test\Integration\AbstractTestCase;

class BasicPluginTest extends AbstractTestCase
{
    public function testIfBundleIsRegistered()
    {
        $this->assertBundleIsInstalled();
    }
}

namespace Swag\Example\Test\Integration;

use PHPUnit\Framework\TestCase;
use Shopware\Core\Framework\Test\TestCaseBase\IntegrationTestBehaviour;
use Yireo\IntegrationTestHelper\Traits\AssertBundleIsInstalled;

class BasicPluginTest extends TestCase
{
    use IntegrationTestBehaviour;
    use AssertBundleIsInstalled;
    
    public function getName(): string
    {
        return self::class; // Shopware 6.5