BackupDatabaseClientTest.php in Backup Database 8
File
tests/src/Unit/BackupDatabaseClientTest.php
View source
<?php
namespace Drupal\Tests\backup_db\Unit;
use Prophecy\Argument;
use Drupal\Tests\UnitTestCase;
use Drupal\Core\DependencyInjection\ContainerBuilder;
class BackupDatabaseClientTest extends UnitTestCase {
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();
}
public function testFileHandler() {
$this
->assertInstanceOf('Drupal\\backup_db\\BackupDatabaseFileHandler', $this->stub
->getFileHandler());
}
}