4 require_once(
"libs/composer/vendor/autoload.php");
5 include_once(
"tests/UI/Crawler/Fixture/Fixture.php");
14 "composition"=>
array(),
15 "interaction"=>
array(),
19 "responsiveness"=>
array(),
20 "accessibility"=>
array()
31 "usage"=>
array(
"Correct"),
32 "composition"=>
"Wrong" 35 "usage"=>
array(
"Correct"),
39 "usage"=>
array(1 =>
"Usage Rule 1", 2 =>
"Usage Rule 2"),
40 "composition"=>
array(1 =>
"composition Rule 1", 2 =>
"composition Rule 2"),
41 "interaction"=>
array(1 =>
"interaction Rule 1", 2 =>
"interaction Rule 2"),
42 "wording"=>
array(1 =>
"wording Rule 1", 2 =>
"wording Rule 2"),
43 "ordering"=>
array(1 =>
"ordering Rule 1", 2 =>
"ordering Rule 2"),
44 "style"=>
array(1 =>
"style Rule 1", 2 =>
"style Rule 2"),
45 "responsiveness"=>
array(1 =>
"responsiveness Rule 1", 2 =>
"responsiveness Rule 2"),
46 "accessibility"=>
array(1 =>
"accessibility Rule 1", 2 =>
"accessibility Rule 2")
49 "usage"=>
array(1 =>
"Usage Rule 1", 2 =>
"Usage Rule 2"),
53 "usage"=>
array(1 =>
"Usage Rule 1", 2 =>
"Usage Rule 2"),
54 "composition"=>
array(),
55 "interaction"=>
array(),
59 "responsiveness"=>
array(),
60 "accessibility"=>
array()
86 $this->assertEquals($this->empty_rules_array,
$rule->getRules());
89 $this->assertEquals($this->empty_rules_array, $rule->getRules());
99 $this->assertFalse(
"This should not happen");
101 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::ARRAY_EXPECTED);
111 $this->assertFalse(
"This should not happen");
113 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::INVALID_INDEX);
123 $this->assertFalse(
"This should not happen");
125 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::INVALID_INDEX);
135 $this->assertFalse(
"This should not happen");
137 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::ARRAY_EXPECTED);
147 $this->assertFalse(
"This should not happen");
149 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::STRING_EXPECTED);
158 $this->assertEquals($this->correct_rules1_array, $rules->getRules());
167 $this->assertEquals($this->correct_rules2_array_return, $rules->getRules());
172 $entry = $this->parser->parseArrayFromFile(
"tests/UI/Crawler/Fixture/ProperEntry.php")[0];
174 $entry[
"rules"][
'composition'] =
array();
175 $entry[
"rules"][
'interaction'] =
array();
176 $entry[
"rules"][
'wording'] =
array();
177 $entry[
"rules"][
'ordering'] =
array();
178 $entry[
"rules"][
'responsiveness'] =
array();
179 $entry[
"rules"][
'accessibility'] =
array();
182 $this->assertEquals($rules->getRules(), $entry[
"rules"]);
Container to hold rules of UI Components.
$invalid_categories2_array
testInvalidCategoryValue()
$invalid_category_value_array
testInvalidCategoryItem()
Create styles array
The data for the language used.
testParseProperEntryToArray()
$invalid_categories1_array
$invalid_category_item_array
$correct_rules2_array_return