PathFieldDefinitionTest.php 1.2 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php

/**
 * @file
 * Contains \Drupal\path\Tests\Plugin\Field\FieldType\PathFieldDefinitionTest
 */

namespace Drupal\path\Tests\Field;

use Drupal\Tests\Core\Field\FieldDefinitionTestBase;

/**
 * Tests a field definition for a 'path' field.
 *
 * @see \Drupal\Core\Field\FieldDefinition
 * @see \Drupal\path\Plugin\Field\FieldType\PathItem
 *
 * @group Drupal
 * @group path
 */
class PathFieldDefinitionTest extends FieldDefinitionTestBase {

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Path field definitions',
      'description' => 'Tests that field definitions for path fields work correctly.',
      'group' => 'Path',
    );
  }

  /**
   * {@inheritdoc}
   */
  protected function getPluginId() {
    return 'path';
  }

  /**
   * {@inheritdoc}
   */
44
45
  protected function getModuleAndPath() {
    return array('path', dirname(dirname(dirname(__DIR__))));
46
47
48
49
50
51
  }

  /**
   * Tests FieldDefinition::getColumns().
   *
   * @covers \Drupal\Core\Field\FieldDefinition::getColumns
52
   * @covers \Drupal\path\Plugin\Field\FieldType\PathItem::schema
53
54
55
56
57
58
   */
  public function testGetColumns() {
    $this->assertSame(array(), $this->definition->getColumns());
  }

}