FileTransferTest.php

Same filename in this branch
  1. 10 core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
Same filename in other branches
  1. 9 core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
  2. 8.9.x core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
  3. 11.x core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php
  4. 11.x core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php

Namespace

Drupal\Tests\system\Unit\FileTransfer

File

core/modules/system/tests/src/Unit/FileTransfer/FileTransferTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\system\Unit\FileTransfer;

use Drupal\Tests\system\Functional\FileTransfer\MockTestConnection;
use Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer;
use Drupal\Tests\UnitTestCase;

/**
 * @group FileTransfer
 */
class FileTransferTest extends UnitTestCase {
    
    /**
     * @var \Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer
     */
    protected TestFileTransfer $testConnection;
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->testConnection = TestFileTransfer::factory($this->root, []);
    }
    public function testFileTransferMagicMethods() : void {
        // Test to ensure __get() preserves public access.
        $this->assertInstanceOf(MockTestConnection::class, $this->testConnection->connection);
    }

}

Classes

Title Deprecated Summary
FileTransferTest @group FileTransfer

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.