4 require_once(
"libs/composer/vendor/autoload.php");
5 include_once(
"tests/UI/Crawler/Fixture/Fixture.php");
28 $entries = $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/ComponentsTreeFixture/RootFactory.php");
29 $entries->getEntryById(
"NonExistent")->getChildren();
30 $entries->getParentsOfEntry(
"NonExistent");
31 $this->assertFalse(
"This should not happen");
34 $this->assertEquals($e->getCode(),Crawler\Exception\CrawlerException::INVALID_ID);
42 $entries = $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/ComponentsTreeFixture/RootFactory.php");
43 $this->assertEquals(6,count($entries));
45 $this->assertEquals(2,count($entries->getEntryById(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")->getChildren()));
46 $this->assertEquals(3,count($entries->getDescendantsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")));
47 $this->assertEquals(1,count($entries->getEntryById(
"testsUICrawlerFixtureComponentsTreeFixtureComponent2FactoryComponent2")->getChildren()));
48 $this->assertEquals(0,count($entries->getParentsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1FactoryComponent1")));
49 $this->assertEquals(2,count($entries->getParentsOfEntry(
"testsUICrawlerFixtureComponentsTreeFixtureComponent1component12component121Component121")));
58 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/LoopFactory.php");
60 $this->assertFalse(
"This should not happen");
63 $this->assertEquals($e->getCode(),Crawler\Exception\CrawlerException::CRAWL_MAX_NESTING_REACHED);
72 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/IdenticalNamesFactory.php");
73 $this->assertTrue(
true);
81 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/IdenticalEntriesFactory.php");
82 $this->assertFalse(
"This should not happen");
85 $this->assertEquals($e->getCode(),Crawler\Exception\CrawlerException::DUPLICATE_ENTRY);
94 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/NoNamespaceFactory.php");
95 $this->assertFalse(
"This should not happen");
98 $this->assertEquals($e->getCode(),Crawler\Exception\CrawlerException::ENTRY_WITH_NO_VALID_RETURN_STATEMENT);
108 $this->crawler->crawlFactory(
"tests/UI/Crawler/Fixture/NoClosingDescriptionFactory.php");
110 $this->assertFalse(
"This should not happen");
113 $this->assertEquals($e->getCode(),Crawler\Exception\CrawlerException::ENTRY_WITH_NO_YAML_DESCRIPTION);
testIdenticalEntriesFactory()
testNoClosingDescriptionFactory()
testIdenticalNamesFactory()