You are here

public function PlanCRUDTest::testEditPlan in farmOS 2.x

Edit plan entity.

File

modules/core/plan/tests/src/Functional/PlanCRUDTest.php, line 79

Class

PlanCRUDTest
Tests the plan CRUD.

Namespace

Drupal\Tests\plan\Functional

Code

public function testEditPlan() {
  $plan = $this
    ->createPlanEntity();
  $plan
    ->save();
  $edit = [
    'name[0][value]' => $this
      ->randomMachineName(),
  ];
  $this
    ->drupalPostForm($plan
    ->toUrl('edit-form'), $edit, $this
    ->t('Save'));
  $this
    ->assertText($edit['name[0][value]']);
}