You are here

public function JsonLogDataTest::testLinkAndCodeWillAlwaysBeSetAccordinglyWithAlphanumericString in JSONlog 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testLinkAndCodeWillAlwaysBeSetAccordinglyWithAlphanumericString()
  2. 3.x tests/src/Unit/JsonLogDataTest.php \Drupal\Tests\jsonlog\Unit\JsonLogDataTest::testLinkAndCodeWillAlwaysBeSetAccordinglyWithAlphanumericString()

File

tests/src/Unit/JsonLogDataTest.php, line 173

Class

JsonLogDataTest
Unit tests for JsonLogData class

Namespace

Drupal\Tests\jsonlog\Unit

Code

public function testLinkAndCodeWillAlwaysBeSetAccordinglyWithAlphanumericString() {
  $this->data = new JsonLogData('test_site_id', 'test_canonical');
  $this->data
    ->setLink('abcdef');
  $this
    ->assertEquals('abcdef', $this->data
    ->getLink(), 'Link set.');
  $this
    ->assertEquals(0, $this->data
    ->getCode(), 'Code set.');
}