4 require_once(
"libs/composer/vendor/autoload.php");
5 include_once(
"tests/UI/Crawler/Fixture/Fixture.php");
32 "purpose" =>
"Correct",
33 "composition" => array(
"Wrong")
36 "purpose" =>
"Correct",
37 "rivals" => array(array(
"wrong"))
41 "purpose" =>
"Purpose Description",
42 "composition" =>
"Composition Description",
43 "effect" =>
"Effect Description",
44 "rivals" => array(
"Element 1" =>
"Rival 1",
"Element 2" =>
"Rival 2")
48 "purpose" =>
"Purpose Description" 52 "purpose" =>
"Purpose Description",
81 $this->assertEquals($this->empty_description_array,
$description->getDescription());
84 $this->assertEquals($this->empty_description_array, $description->getDescription());
94 $this->assertFalse(
"This should not happen");
96 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::ARRAY_EXPECTED);
106 $this->assertFalse(
"This should not happen");
108 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::INVALID_INDEX);
118 $this->assertFalse(
"This should not happen");
120 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::INVALID_INDEX);
130 $this->assertFalse(
"This should not happen");
132 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::STRING_EXPECTED);
142 $this->assertFalse(
"This should not happen");
144 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::STRING_EXPECTED);
153 $this->assertEquals($this->correct_description1_array,
$description->getDescription());
162 $this->assertEquals($this->correct_description2_array_return,
$description->getDescription());
167 $entry = $this->parser->parseArrayFromFile(
"tests/UI/Crawler/Fixture/ProperEntry.php")[0];
169 $entry[
"description"][
'composition'] =
"";
170 $entry[
"description"][
'effect'] =
"";
174 $this->assertEquals(
$description->getDescription(), $entry[
"description"]);
testParseProperEntryToArray()
testCorrectDescription1()
$invalid_categories2_array
$correct_description2_array_return
$correct_description2_array
$invalid_category_item_array
$correct_description1_array
$invalid_categories1_array
testInvalidCategoryValue()
testCorrectDescription2()
Container to hold description of UI Components.
testInvalidCategoryItem()
$invalid_category_value_array