for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*******************************************************************************
* This file is part of the GraphQL Bundle package.
*
* (c) YnloUltratech <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
******************************************************************************/
namespace Ynlo\GraphQLBundle\Behat\Storage;
use Behat\Behat\EventDispatcher\Event\ScenarioTested;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Restart the storage before every scenario
*/
class StorageResetSubscriber implements EventSubscriberInterface
{
* @var Storage
protected $storage;
public function __construct(Storage $storage)
$this->storage = $storage;
}
* {@inheritdoc}
public static function getSubscribedEvents()
return [
ScenarioTested::BEFORE => 'clear',
];
public function clear()
$this->storage->clear();