/**
* @test
*/
public function it_construct_a_valid_json_with_option()
{
$targetPartial = '{
"collapse_key":"collapseKey",
"content_available":true
}';
$targetFull = '{
"collapse_key":"collapseKey",
"content_available":true,
"priority":"high",
"delay_while_idle":true,
"time_to_live":200,
"restricted_package_name":"customPackageName",
"dry_run": true
}';
$optionBuilder = new OptionsBuilder();
$optionBuilder->setCollapseKey("collapseKey");
$optionBuilder->setContentAvailable(true);
$json = json_encode($optionBuilder->build()->toArray());
$this->assertJsonStringEqualsJsonString($targetPartial, $json);
$optionBuilder->setPriority(OptionsPriorities::high)->setDelayWhileIdle(true)->setDryRun(true)->setRestrictedPackageName("customPackageName")->setTimeToLive(200);
$json = json_encode($optionBuilder->build()->toArray());
$this->assertJsonStringEqualsJsonString($targetFull, $json);
}