You are here

ConnectorInfoTest.php in TMGMT Translator Smartling 8.4

Same filename and directory in other branches
  1. 8.3 tests/src/Kernel/ConnectorInfoTest.php

File

tests/src/Kernel/ConnectorInfoTest.php
View source
<?php

namespace Drupal\Tests\tmgmt_smartling\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\tmgmt_smartling\Smartling\ConnectorInfo;

/**
 * Test ConnectorInfo class methods.
 *
 * @group tmgmt_smartling
 */
class ConnectorInfoTest extends KernelTestBase {
  public static $modules = [
    'system',
  ];
  public function testGetLibName() {
    $this
      ->assertEquals(ConnectorInfo::getLibName(), 'drupal-tmgmt-connector');
  }
  public function testGetLibVersion() {
    $this
      ->assertTrue(preg_match('/(^\\d\\.\\d\\.\\d+$)|(^\\d\\.\\d\\.\\d-rc\\d+$)|(^\\d\\.\\d\\.x-dev+$)/', ConnectorInfo::getLibVersion('system')) === 1);
  }
  public function testGetDependenciesVersionsAsString() {
    $this
      ->assertTrue(preg_match('/^tmgmt_extension_suit\\/(\\d+\\.x-\\d+\\.\\d+|\\d+\\.x-\\d+\\.x-dev|unknown) tmgmt\\/(\\d+\\.x-\\d+\\.\\d+|\\d+\\.x-\\d+\\.x-dev|unknown)$/', ConnectorInfo::getDependenciesVersionsAsString()) === 1);
  }

}

Classes

Namesort descending Description
ConnectorInfoTest Test ConnectorInfo class methods.