19 declare(strict_types=1);
    21 require_once(
"vendor/composer/vendor/autoload.php");
    22 include_once(
"components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php");
    29     protected Crawler\EntriesYamlParser 
$parser;
    32     protected function setUp(): void
    34         $this->parser = 
new Crawler\EntriesYamlParser();
    44             $this->parser->parseYamlStringArrayFromFile(
"Invalid Path");
    45             $this->assertFalse(
"This should not happen");
    47             $this->assertEquals(
Crawler\
Exception\CrawlerException::INVALID_FILE_PATH, $e->getCode());
    56         $yaml_entries = $this->parser->parseYamlStringArrayFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/ProperEntry.php");
    58         $this->assertEquals($this->proper_entry->properEntryYamlString, $yaml_entries[0]);
    59         $this->assertEquals($this->proper_entry->properEntryYamlString, $yaml_entries[0]);
    64         $entries = $this->parser->parseArrayFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/ProperEntry.php");
    65         $this->assertEquals($this->proper_entry->properEntryYamlArray, $entries);
    74             $this->parser->parseYamlStringArrayFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/NoDescriptionEntry.php");
    75             $this->assertFalse(
"This should not happen");
    77             $this->assertEquals(
Crawler\
Exception\CrawlerException::ENTRY_WITH_NO_YAML_DESCRIPTION, $e->getCode());
    86             $this->parser->parseYamlStringArrayFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/NoReturnValueEntry.php");
    87             $this->assertFalse(
"This should not happen");
    89             $this->assertEquals(
Crawler\
Exception\CrawlerException::ENTRY_WITH_NO_VALID_RETURN_STATEMENT, $e->getCode());
    99             $this->parser->parseArrayFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/InvalidYamlEntry.php");
   100             $this->assertFalse(
"This should not happen");
   102             $this->assertEquals(
Crawler\
Exception\CrawlerException::PARSING_YAML_ENTRY_FAILED, $e->getCode());
   108         $test_string = 
"Hello Camel Case";
   110         $this->assertEquals(
"helloCamelCase", 
Crawler\EntriesYamlParser::toLowerCamelCase($test_string, 
' '));
   111         $this->assertEquals(
"HelloCamelCase", 
Crawler\EntriesYamlParser::toUpperCamelCase($test_string, 
' '));
   119         $entries = $this->parser->parseEntriesFromFile(
"components/ILIAS/UI/tests/Crawler/Fixture/ProperEntry.php");
   121         $this->assertCount(1, $entries);
   123             "CrawlerFixtureProperEntryProperEntry",
   124             $entries->getEntryById(
"CrawlerFixtureProperEntryProperEntry")->getId()
   127             "components/ILIAS/UI/src/Crawler/Fixture/ProperEntry",
   128             $entries->getEntryById(
"CrawlerFixtureProperEntryProperEntry")->getPath()
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
testParseProperEntryToArray()
 
ProperEntryFixture $proper_entry
 
testParseProperEntryToYamlEntries()
 
Crawler EntriesYamlParser $parser
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...