public function FeedTest::testSetActive in Feeds 8.3
@covers ::setActive @covers ::isActive
File
- tests/
src/ Kernel/ Entity/ FeedTest.php, line 530
Class
- FeedTest
- @coversDefaultClass \Drupal\feeds\Entity\Feed @group feeds
Namespace
Drupal\Tests\feeds\Kernel\EntityCode
public function testSetActive() {
$feed = $this
->createFeed($this->feedType
->id());
// Activate feed.
$feed
->setActive(TRUE);
$this
->assertSame(TRUE, $feed
->isActive());
// Deactivate feed.
$feed
->setActive(FALSE);
$this
->assertSame(FALSE, $feed
->isActive());
// Activate feed again.
$feed
->setActive(TRUE);
$this
->assertSame(TRUE, $feed
->isActive());
}