Definition at line 10 of file EntriesYamlParserTest.php.
◆ setUp()
◆ testCamelCase()
CrawlerTest::testCamelCase |
( |
| ) |
|
Definition at line 98 of file EntriesYamlParserTest.php.
99 {
100 $test_string = "Hello Camel Case";
101
102 $this->assertEquals(
"helloCamelCase",
Crawler\EntriesYamlParser::toLowerCamelCase($test_string,
' '));
103 $this->assertEquals(
"HelloCamelCase",
Crawler\EntriesYamlParser::toUpperCamelCase($test_string,
' '));
104 }
◆ testGenerateEntry()
CrawlerTest::testGenerateEntry |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 109 of file EntriesYamlParserTest.php.
110 {
111 $entries = $this->parser->parseEntriesFromFile("tests/UI/Crawler/Fixture/ProperEntry.php");
112
113 $this->assertEquals(1, count($entries));
114 $this->assertEquals("CrawlerFixtureProperEntryProperEntry", $entries->getEntryById("CrawlerFixtureProperEntryProperEntry")->getId());
115 $this->assertEquals("src/UI/Crawler/Fixture/ProperEntry", $entries->getEntryById("CrawlerFixtureProperEntryProperEntry")->getPath());
116 }
◆ testInvalidYamlEntry()
CrawlerTest::testInvalidYamlEntry |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 88 of file EntriesYamlParserTest.php.
89 {
90 try {
91 $this->parser->parseArrayFromFile("tests/UI/Crawler/Fixture/InvalidYamlEntry.php");
92 $this->assertFalse("This should not happen");
94 $this->assertEquals(
$e->getCode(),
Crawler\Exception\CrawlerException::PARSING_YAML_ENTRY_FAILED);
95 }
96 }
References Vendor\Package\$e.
◆ testNoDescriptionEntry()
CrawlerTest::testNoDescriptionEntry |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 63 of file EntriesYamlParserTest.php.
64 {
65 try {
66 $this->parser->parseYamlStringArrayFromFile("tests/UI/Crawler/Fixture/NoDescriptionEntry.php");
67 $this->assertFalse("This should not happen");
69 $this->assertEquals(
$e->getCode(),
Crawler\Exception\CrawlerException::ENTRY_WITH_NO_YAML_DESCRIPTION);
70 }
71 }
References Vendor\Package\$e.
◆ testNoReturnValueEntry()
CrawlerTest::testNoReturnValueEntry |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 75 of file EntriesYamlParserTest.php.
76 {
77 try {
78 $this->parser->parseYamlStringArrayFromFile("tests/UI/Crawler/Fixture/NoReturnValueEntry.php");
79 $this->assertFalse("This should not happen");
81 $this->assertEquals(
$e->getCode(),
Crawler\Exception\CrawlerException::ENTRY_WITH_NO_VALID_RETURN_STATEMENT);
82 }
83 }
References Vendor\Package\$e.
◆ testParseInvalidFile()
CrawlerTest::testParseInvalidFile |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 33 of file EntriesYamlParserTest.php.
34 {
35 try {
36 $this->parser->parseYamlStringArrayFromFile("Invalid Path");
37 $this->assertFalse("This should not happen");
39 $this->assertEquals(
$e->getCode(),
Crawler\Exception\CrawlerException::INVALID_FILE_PATH);
40 }
41 }
References Vendor\Package\$e.
◆ testParseProperEntryToArray()
CrawlerTest::testParseProperEntryToArray |
( |
| ) |
|
Definition at line 54 of file EntriesYamlParserTest.php.
55 {
56 $entries = $this->parser->parseArrayFromFile("tests/UI/Crawler/Fixture/ProperEntry.php");
57 $this->assertEquals($this->proper_entry->properEntryYamlArray, $entries);
58 }
◆ testParseProperEntryToYamlEntries()
CrawlerTest::testParseProperEntryToYamlEntries |
( |
| ) |
|
- Exceptions
-
Exception\CrawlerException
Definition at line 46 of file EntriesYamlParserTest.php.
47 {
48 $yaml_entries = $this->parser->parseYamlStringArrayFromFile("tests/UI/Crawler/Fixture/ProperEntry.php");
49
50 $this->assertEquals($this->proper_entry->properEntryYamlString, $yaml_entries[0]);
51 $this->assertEquals($this->proper_entry->properEntryYamlString, $yaml_entries[0]);
52 }
◆ $parser
◆ $proper_entry
CrawlerTest::$proper_entry |
|
protected |
The documentation for this class was generated from the following file: