You are here

public function BackupDatabaseClientTest::setUp in Backup Database 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/BackupDatabaseClientTest.php, line 25
Contains \Drupal\Tests\backup_db\Unit\BackupDatabaseClientTest

Class

BackupDatabaseClientTest
Test BackupDatabaseClient

Namespace

Drupal\Tests\backup_db\Unit

Code

public function setUp() {
  parent::setUp();
  $handler = $this
    ->prophesize('Drupal\\backup_db\\BackupDatabaseFileHandler');
  $connection = $this
    ->prophesize('Drupal\\Core\\Database\\Connection');
  $config = $this
    ->prophesize('Drupal\\Core\\Config\\ConfigFactoryInterface');
  $this->stub = $this
    ->getMockBuilder('Drupal\\backup_db\\BackupDatabaseClient')
    ->setConstructorArgs([
    $handler
      ->reveal(),
    $connection
      ->reveal(),
    $config
      ->reveal(),
  ])
    ->setMethods(null)
    ->getMock();
}