You are here

public function ApidocEntityTest::testEntityBaseFieldNameLength in Apigee API Catalog 8

Test entity with name longer than 50 characters.

File

tests/src/Kernel/ApidocEntityTest.php, line 138

Class

ApidocEntityTest
Test basic CRUD operations for our ApiDoc entity type.

Namespace

Drupal\Tests\apigee_api_catalog\Kernel

Code

public function testEntityBaseFieldNameLength() {
  $entity = ApiDoc::create([
    'name' => $this
      ->randomString(100),
    'description' => 'Test API 1',
    'spec' => NULL,
    'api_product' => NULL,
  ]);
  $this
    ->assertNotNull($entity);
  $this
    ->assertEquals(SAVED_NEW, $entity
    ->save());
}