32 'fullName' =>
"MIT License",
33 'text' =>
"MIT License Copyright (c) <year> <copyright holders> ...",
34 'url' =>
"https://opensource.org/licenses/MIT",
36 'isCandidate' =>
false,
40 $actualLicense =
new License(22,
"MIT",
"MIT License",
41 "MIT License Copyright (c) <year> <copyright holders> ...",
42 "https://opensource.org/licenses/MIT", [], 3,
false);
44 $this->assertEquals($expectedLicense, $actualLicense->getArray());
57 'fullName' =>
"MIT License",
58 'text' =>
"MIT License Copyright (c) <year> <copyright holders> ...",
59 'url' =>
"https://opensource.org/licenses/MIT",
64 $actualLicense =
new License(22,
"MIT",
"MIT License",
65 "MIT License Copyright (c) <year> <copyright holders> ...",
66 "https://opensource.org/licenses/MIT",
null, 3,
true);
68 $this->assertEquals($expectedLicense, $actualLicense->getArray());
81 'fullName' =>
"MIT License",
82 'text' =>
"MIT License Copyright (c) <year> <copyright holders> ...",
83 'url' =>
"https://opensource.org/licenses/MIT"
86 $sampleLicense =
new License(0,
"MIT",
"MIT License",
87 "MIT License Copyright (c) <year> <copyright holders> ...",
88 "https://opensource.org/licenses/MIT");
92 $this->assertEquals($sampleLicense->getArray(), $actualLicense->getArray());
94 $bogusInput = array_merge($inputLicense, [
"invalidKey" => 123]);
96 $this->assertEquals(-1, $bogusLicense);
static parseFromArray($inputLicense)
testDataFormatNoObligation()