public function FeedsDrushCommandsTest::testLockFeed in Feeds 8.3
@covers ::lockFeed
File
- tests/
src/ Functional/ Commands/ FeedsDrushCommandsTest.php, line 198
Class
- FeedsDrushCommandsTest
- @coversDefaultClass \Drupal\feeds\Commands\FeedsDrushCommands @group feeds
Namespace
Drupal\Tests\feeds\Functional\CommandsCode
public function testLockFeed() {
// Create a feed.
$feed = $this
->createFeed($this->feedType
->id(), [
'title' => 'Foo',
]);
$this
->assertFalse($feed
->isLocked());
$this
->drush('feeds:lock', [
$feed
->id(),
]);
$this
->assertTrue($feed
->isLocked());
$this
->assertStringContainsString('The feed "Foo" has been locked.', $this
->getErrorOutput());
// Try to lock it again.
$this
->drush('feeds:lock', [
$feed
->id(),
]);
$this
->assertStringContainsString('This feed is already locked.', $this
->getErrorOutput());
}