You are here

public function JsonLogDataTest::testCanGetDefaultDataFromInitialisedDataClass in JSONlog 8

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

File

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

Class

JsonLogDataTest
Unit tests for JsonLogData class

Namespace

Drupal\Tests\jsonlog\Unit

Code

public function testCanGetDefaultDataFromInitialisedDataClass() {
  $this->data = new JsonLogData('test_site_id', 'test_canonical');
  $this
    ->assertNotEmpty($this->data
    ->getJson(), 'Json data returned');
  $this
    ->assertNotEmpty($this->data
    ->getData(), 'Flat data returned');
}