
| Current Path : /var/www/html1/rrr/web/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //var/www/html1/rrr/web/core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php |
<?php
namespace Drupal\Tests\Composer\Plugin\Scaffold\Integration;
use Drupal\Composer\Plugin\Scaffold\Operations\SkipOp;
use Drupal\Composer\Plugin\Scaffold\ScaffoldOptions;
use Drupal\Tests\Composer\Plugin\Scaffold\Fixtures;
use Drupal\Tests\Traits\PhpUnitWarnings;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \Drupal\Composer\Plugin\Scaffold\Operations\SkipOp
*
* @group Scaffold
*/
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->assertFileNotExists($destination->fullPath());
// Test the system under test.
$sut->process($destination, $fixtures->io(), $options);
// Assert that the target file was not created.
$this->assertFileNotExists($destination->fullPath());
// Confirm that expected output was written to our io fixture.
$output = $fixtures->getOutput();
$this->assertStringContainsString('Skip [web-root]/robots.txt: disabled', $output);
}
}