4 require_once(
"libs/composer/vendor/autoload.php");
5 include_once(
"tests/UI/Crawler/Fixture/Fixture.php");
30 $entries = $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/ComponentsTreeFixture/RootFactory.php");
31 $entries->getEntryById(
"NonExistent")->getChildren();
32 $entries->getParentsOfEntry(
"NonExistent");
33 $this->assertFalse(
"This should not happen");
35 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::INVALID_ID);
44 $entries = $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/ComponentsTreeFixture/RootFactory.php");
45 $this->assertEquals(6, count($entries));
47 $this->assertEquals(2, count($entries->getEntryById(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")->getChildren()));
48 $this->assertEquals(3, count($entries->getDescendantsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")));
49 $this->assertEquals(1, count($entries->getEntryById(
"testsUICrawlerFixtureComponentsTreeFixtureComponent2FactoryComponent2")->getChildren()));
50 $this->assertEquals(0, count($entries->getParentsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")));
51 $this->assertEquals(2, count($entries->getParentsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1component12component121Component121")));
60 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/LoopFactory.php");
62 $this->assertFalse(
"This should not happen");
64 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::CRAWL_MAX_NESTING_REACHED);
74 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/IdenticalNamesFactory.php");
75 $this->assertTrue(
true);
84 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/IdenticalEntriesFactory.php");
85 $this->assertFalse(
"This should not happen");
87 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::DUPLICATE_ENTRY);
97 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/NoNamespaceFactory.php");
98 $this->assertFalse(
"This should not happen");
100 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::ENTRY_WITH_NO_VALID_RETURN_STATEMENT);
110 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/NoClosingDescriptionFactory.php");
112 $this->assertFalse(
"This should not happen");
114 $this->assertEquals($e->getCode(), Crawler\Exception\CrawlerException::ENTRY_WITH_NO_YAML_DESCRIPTION);
testIdenticalEntriesFactory()
testNoClosingDescriptionFactory()
testIdenticalNamesFactory()