assertEmptiedModerationFieldItemList example

$this->testNode->moderation_state->get(2);
  }

  /** * Tests the item list when it is emptied and appended to. */
  public function testEmptyStateAndAppend() {
    // This test case mimics the lifecycle of an entity that is being patched in     // a rest resource.     $this->testNode->moderation_state->setValue([]);
    $this->assertTrue($this->testNode->moderation_state->isEmpty());
    $this->assertEmptiedModerationFieldItemList();

    $this->testNode->moderation_state->appendItem();
    $this->assertEquals(1, $this->testNode->moderation_state->count());
    $this->assertEquals(NULL, $this->testNode->moderation_state->value);
    $this->assertEmptiedModerationFieldItemList();
  }

  /** * Tests an empty value assigned to the field item. */
  public function testEmptyFieldItem() {
    
Home | Imprint | This part of the site doesn't use cookies.