InspectionTest.php in Zircon Profile 8        
                          
                  
                        
  
  
  
File
  core/modules/system/src/Tests/Plugin/InspectionTest.php
  
    View source  
  <?php
namespace Drupal\system\Tests\Plugin;
class InspectionTest extends PluginTestBase {
  
  function testInspection() {
    foreach (array(
      'user_login',
    ) as $id) {
      $plugin = $this->testPluginManager
        ->createInstance($id);
      $expected_definition = $this->testPluginExpectedDefinitions[$id];
      $this
        ->assertIdentical($plugin
        ->getPluginId(), $id);
      $this
        ->assertIdentical($this->testPluginManager
        ->getDefinition($id), $expected_definition);
      $this
        ->assertIdentical($plugin
        ->getPluginDefinition(), $expected_definition);
    }
    
    foreach (array(
      'user_login',
      'layout',
    ) as $id) {
      $plugin = $this->mockBlockManager
        ->createInstance($id);
      $expected_definition = $this->mockBlockExpectedDefinitions[$id];
      $this
        ->assertIdentical($plugin
        ->getPluginId(), $id);
      $this
        ->assertIdentical($this
        ->castSafeStrings($this->mockBlockManager
        ->getDefinition($id)), $expected_definition);
      $this
        ->assertIdentical($this
        ->castSafeStrings($plugin
        ->getPluginDefinition()), $expected_definition);
    }
    
    foreach (array(
      'test_block1',
      'test_block2',
    ) as $id) {
      $plugin = $this->defaultsTestPluginManager
        ->createInstance($id);
      $expected_definition = $this->defaultsTestPluginExpectedDefinitions[$id];
      $this
        ->assertIdentical($plugin
        ->getPluginId(), $id);
      $this
        ->assertIdentical($this->defaultsTestPluginManager
        ->getDefinition($id), $expected_definition);
      $this
        ->assertIdentical($this
        ->castSafeStrings($plugin
        ->getPluginDefinition()), $expected_definition);
    }
  }
}
 
Classes
        
  
  
      
      
         
      
                  
            Name            | 
                  
            Description           | 
              
    
    
          
                  | 
            InspectionTest           | 
                  
            Tests that plugins implementing PluginInspectionInterface are inspectable.           |