You are here

PluginTypeConverterTest.php in Plugin 8.2

File

tests/src/Functional/ParamConverter/PluginTypeConverterTest.php
View source
<?php

namespace Drupal\Tests\plugin\Functional\ParamConverter;

use Drupal\Tests\BrowserTestBase;

/**
 * Tests \Drupal\plugin\ParamConverter\PluginTypeConverter's integration.
 *
 * @group Plugin
 */
class PluginTypeConverterTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    'plugin',
    'plugin_test_helper',
    'system',
  ];

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * Tests the integration.
   */
  public function testIntegration() {
    $this
      ->drupalGet('plugin_test_helper/paramconverter/plugin_type/plugin_test_helper_mock');
    $this
      ->assertSession()
      ->statusCodeEquals(200);
    $this
      ->drupalGet('plugin_test_helper/paramconverter/plugin_type/foo');
    $this
      ->assertSession()
      ->statusCodeEquals(404);
  }

}

Classes

Namesort descending Description
PluginTypeConverterTest Tests \Drupal\plugin\ParamConverter\PluginTypeConverter's integration.