57 if ($version == ApiVersion::V2) {
60 "copyrightEmailAuthor" =>
"true",
71 "copyright_email_author" =>
"true",
81 $expectedObject =
new Analysis(
true,
true,
true,
true);
84 $actualObject->setUsingArray($analysisArray, $version);
86 $this->assertEquals($expectedObject, $actualObject);
97 $analysisStringComma =
"bucket, ecc, keyword";
98 $analysisStringSemi =
"bucket;ecc;monk";
100 $expectedObjectComma =
new Analysis();
101 $expectedObjectComma->setBucket(
true);
102 $expectedObjectComma->setEcc(
true);
103 $expectedObjectComma->setKeyword(
true);
105 $expectedObjectSemi =
new Analysis();
106 $expectedObjectSemi->setBucket(
true);
107 $expectedObjectSemi->setEcc(
true);
108 $expectedObjectSemi->setMonk(
true);
110 $actualObjectComma =
new Analysis();
111 $actualObjectComma->setUsingString($analysisStringComma);
113 $actualObjectSemi->setUsingString($analysisStringSemi);
115 $this->assertEquals($expectedObjectComma, $actualObjectComma);
116 $this->assertEquals($expectedObjectSemi, $actualObjectSemi);
150 if($version==ApiVersion::V2){
153 "copyrightEmailAuthor" =>
true,
162 "compatibility" => false
167 "copyright_email_author" =>
true,
176 "compatibility" => false
180 $actualObject->setBucket(
true);
181 $actualObject->setCopyright(
true);
182 $actualObject->setMime(
true);
183 $actualObject->setNomos(
true);
184 $actualObject->setOjo(
true);
185 $actualObject->setReso(
true);
187 $this->assertEquals($expectedArray, $actualObject->getArray($version));
199 $this->assertTrue($analysis->getBucket());
209 $analysis->setBucket(
true);
210 $this->assertTrue($analysis->getBucket());
219 $analysis =
new Analysis(
false,
true);
220 $this->assertTrue($analysis->getCopyright());
230 $analysis->setCopyright(
true);
231 $this->assertTrue($analysis->getCopyright());
240 $analysis =
new Analysis(
false,
false,
true);
241 $this->assertTrue($analysis->getEcc());
251 $analysis->setEcc(
true);
252 $this->assertTrue($analysis->getEcc());
261 $analysis =
new Analysis(
false,
false,
false,
true);
262 $this->assertTrue($analysis->getKeyword());
272 $analysis->setKeyword(
true);
273 $this->assertTrue($analysis->getKeyword());
282 $analysis =
new Analysis(
false,
false,
false,
false,
true);
283 $this->assertTrue($analysis->getMime());
293 $analysis->setMime(
true);
294 $this->assertTrue($analysis->getMime());
303 $analysis =
new Analysis(
false,
false,
false,
false,
false,
true);
304 $this->assertTrue($analysis->getMonk());
Model to hold analysis settings.
Tests for Analysis model.
testSetUsingArray($version)