public function FeedTest::testLock in Feeds 8.3
@covers ::lock @covers ::unlock @covers ::isLocked
File
- tests/
src/ Kernel/ Entity/ FeedTest.php, line 551
Class
- FeedTest
- @coversDefaultClass \Drupal\feeds\Entity\Feed @group feeds
Namespace
Drupal\Tests\feeds\Kernel\EntityCode
public function testLock() {
$feed = $this
->createFeed($this->feedType
->id());
// Lock feed.
$feed
->lock();
$this
->assertSame(TRUE, $feed
->isLocked());
// Unlock feed.
$feed
->unlock();
$this
->assertSame(FALSE, $feed
->isLocked());
// Lock feed again.
$feed
->lock();
$this
->assertSame(TRUE, $feed
->isLocked());
}