class SkipOpTest in Drupal 8
Same name and namespace in other branches
- 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 PhpunitCompatibilityTrait
Expanded class hierarchy of SkipOpTest
File
- core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ Integration/ SkipOpTest.php, line 16
Namespace
Drupal\Tests\Composer\Plugin\Scaffold\IntegrationView source
class SkipOpTest extends TestCase {
use PhpunitCompatibilityTrait;
/**
* @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);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PhpunitCompatibilityTrait:: |
public | function | Returns a mock object for the specified class using the available method. | |
PhpunitCompatibilityTrait:: |
public | function | Compatibility layer for PHPUnit 6 to support PHPUnit 4 code. | |
SkipOpTest:: |
public | function | @covers ::process |