public function CustomBlockPageViewTest::testPageEdit

Checks block edit functionality.

File

drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockPageViewTest.php, line 46
Contains \Drupal\custom_block\Tests\CustomBlockPageViewTest.

Class

CustomBlockPageViewTest
Tests the block edit functionality.

Namespace

Drupal\custom_block\Tests

Code

public function testPageEdit() {
  $this
    ->drupalLogin($this->adminUser);
  $block = $this
    ->createCustomBlock();

  // Attempt to view the block.
  $this
    ->drupalGet('custom-block/' . $block
    ->id());

  // Assert response was '200' and not '403 Access denied'.
  $this
    ->assertResponse('200', 'User was able the view the block');
}