for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ShopwarePlugins\Connect\Tests;
use Doctrine\DBAL\Connection;
trait DatabaseTestCaseTrait
{
/**
* @before
*/
protected function startTransactionBefore()
$connection = Shopware()->Container()->get('dbal_connection');
$connection->beginTransaction();
}
* @after
protected function rollbackTransactionAfter()
$connection->rollBack();
* @param string $file
public function importFixtures($file)
/** @var Connection $connection */
$connection->executeQuery(file_get_contents($file));