15 $actualKey =
'phpunit';
16 $actualValue =
'rulz';
18 $data = [$actualKey => $actualValue];
22 $expected = json_encode(
$data);
24 $this->assertEquals($expected,
$config->toJson());
25 $this->assertArrayHasKey($actualKey,
$config);
26 $this->assertEquals($actualValue,
$config[$actualKey]);
34 $actualKey =
'phpunit';
35 $actualValue =
'rulz';
37 $data = json_encode([$actualKey => $actualValue]);
42 $this->assertArrayHasKey($actualKey,
$config);
43 $this->assertEquals($actualValue,
$config[$actualKey]);
51 $actualKey =
'phpunit';
52 $actualValue =
'rulz';
54 $data = json_encode([$actualKey => $actualValue]);
56 $config = new \ilTermsOfServiceCriterionConfig();
60 $this->assertArrayHasKey($actualKey,
$config);
61 $this->assertEquals($actualValue,
$config[$actualKey]);
testConfigCanBeImportedAsJson()
Class ilTermsOfServiceCriterionBaseTest.
testConfigCanBePassedAsJson()
testConfigCanBePassedAsArray()
Class ilTermsOfServiceCriterionConfigTest.