You are here

class SkipOpTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Integration\SkipOpTest
  2. 9 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Integration\SkipOpTest

@coversDefaultClass \Drupal\Composer\Plugin\Scaffold\Operations\SkipOp

@group Scaffold

Hierarchy

  • class \Drupal\Tests\Composer\Plugin\Scaffold\Integration\SkipOpTest extends \PHPUnit\Framework\TestCase uses PhpUnitWarnings

Expanded class hierarchy of SkipOpTest

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php, line 16

Namespace

Drupal\Tests\Composer\Plugin\Scaffold\Integration
View source
class SkipOpTest extends TestCase {
  use PhpUnitWarnings;

  /**
   * @covers ::process
   */
  public function testProcess() {
    $fixtures = new Fixtures();
    $destination = $fixtures
      ->destinationPath('[web-root]/robots.txt');
    $options = ScaffoldOptions::create([]);
    $sut = new SkipOp();

    // Assert that there is no target file before we run our test.
    $this
      ->assertFileDoesNotExist($destination
      ->fullPath());

    // Test the system under test.
    $sut
      ->process($destination, $fixtures
      ->io(), $options);

    // Assert that the target file was not created.
    $this
      ->assertFileDoesNotExist($destination
      ->fullPath());

    // Confirm that expected output was written to our io fixture.
    $output = $fixtures
      ->getOutput();
    $this
      ->assertStringContainsString('Skip [web-root]/robots.txt: disabled', $output);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PhpUnitWarnings::$deprecationWarnings private static property Deprecation warnings from PHPUnit to raise with @trigger_error().
PhpUnitWarnings::addWarning public function Converts PHPUnit deprecation warnings to E_USER_DEPRECATED.
SkipOpTest::testProcess public function @covers ::process