32 "reuse_group" =>
'fossy',
34 "reuse_enhanced" =>
false,
35 "reuse_copyright" =>
false,
36 "reuse_report" => false
39 $actualReuser =
new Reuser(2,
'fossy',
true);
41 $this->assertEquals($expectedArray, $actualReuser->getArray());
51 $this->expectException(\UnexpectedValueException::class);
52 $this->expectExceptionMessage(
"reuse_upload should be integer");
53 $object =
new Reuser(
'alpha', 2);
83 if ($version == ApiVersion::V1) {
86 "reuse_group" =>
'fossy',
87 "reuse_main" =>
'true',
88 "reuse_enhanced" =>
false,
89 "reuse_copyright" =>
false,
90 "reuse_report" => false
95 "reuseGroup" =>
'fossy',
96 "reuseMain" =>
'true',
97 "reuseEnhanced" =>
false,
98 "reuseCopyright" =>
false,
99 "reuseReport" => false
103 $actualReuser =
new Reuser(1,
'fossy');
104 $actualReuser->setUsingArray($expectedArray, $version);
106 $expectedArray[$version == ApiVersion::V1?
"reuse_main" :
"reuseMain"] =
true;
107 $this->assertEquals($expectedArray, $actualReuser->getArray($version));
119 "reuse_group" =>
'fossy',
120 "reuse_main" =>
'true',
121 "reuse_enhanced" =>
false,
122 "reuse_copyright" =>
'true',
123 "reuse_report" => false
126 $actualReuser =
new Reuser(1,
'fossy');
127 $actualReuser->setUsingArray($expectedArray);
129 $expectedArray[
"reuse_main"] =
true;
130 $expectedArray[
"reuse_copyright"] =
true;
131 $this->assertEquals($expectedArray, $actualReuser->getArray());
142 "reuse_upload" =>
'alpha',
143 "reuse_group" =>
'fossy',
144 "reuse_main" =>
'true',
145 "reuse_enhanced" => false
148 $this->expectException(\UnexpectedValueException::class);
149 $this->expectExceptionMessage(
"Reuse upload should be an integer");
151 $actualReuser =
new Reuser(1,
'fossy');
152 $actualReuser->setUsingArray($expectedArray);
Model to hold info required by Reuser agent.
testSetUsingArraySomeOptions()
testSetUsingArrayException()
testSetUsingArray($version)