ConfigDevelTestBase.php in Configuration development 8
File
tests/src/Unit/ConfigDevelTestBase.php
View source
<?php
namespace Drupal\Tests\config_devel\Unit;
use org\bovigo\vfs\vfsStream;
use Drupal\Tests\UnitTestCase;
abstract class ConfigDevelTestBase extends UnitTestCase {
protected $configFactory;
protected $configManager;
protected $eventDispatcher;
public function setUp() {
parent::setUp();
$this->configFactory = $this
->createMock('Drupal\\Core\\Config\\ConfigFactoryInterface');
$this->eventDispatcher = $this
->createMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->configManager = $this
->createMock('Drupal\\Core\\Config\\ConfigManagerInterface');
$this->configManager
->expects($this
->any())
->method('getEntityTypeIdByName')
->will($this
->returnArgument(0));
vfsStream::setup('public://');
}
}