You are here

public function AssetCRUDTest::testEditAsset in farmOS 2.x

Edit asset entity.

File

modules/core/asset/tests/src/Functional/AssetCRUDTest.php, line 79

Class

AssetCRUDTest
Tests the asset CRUD.

Namespace

Drupal\Tests\asset\Functional

Code

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