protected function setUp() { $keywordStore = new KeywordStore(FALSE); $keywordStore->collectKeywords(__DIR__ . '/test-libraries'); $protocol = new RobotRemoteProtocol(FALSE); $protocol->init($keywordStore); $this->server = new RobotRemoteServer(FALSE); $this->server->init($protocol); }
public function testCollectKeywordsDuplicateDefinitions() { $rootDir = __DIR__ . '/test-libraries-duplicate-keywords'; $keywordStore = new KeywordStore(FALSE); $keywordStore->keywords = array(); $keywordStore->collectKeywords($rootDir); $keywords = $keywordStore->keywords; $this->assertEquals(array('truth_of_life' => array('file' => $rootDir . '/FirstKeywordDefinition.php', 'class' => '\\FirstKeywordDefinition', 'arguments' => array(), 'documentation' => ''), 'strings_should_be_equal' => array('file' => $rootDir . '/SecondKeywordDefinition.php', 'class' => '\\SecondKeywordDefinition', 'arguments' => array('str1', 'str2'), 'documentation' => 'Compare 2 strings. If they are not equal, throws exception.')), $keywords); }