/**
  * Returns array of virtual methods (available selenium commands). Array will be sorted by keys (methodName).
  *
  * @return array Array of methods in format: ['methodName' => 'returnType']
  * @throws \Exception
  */
 public function getAvailableSeleniumCommands()
 {
     $methods = $this->_getBaseMethods() + $this->_getAutoGeneratedMethods() + $this->manualAddedMethods;
     $methods = Helper::filterByKeys($methods, null, $this->manualExcludedMethods);
     ksort($methods);
     return $methods;
 }
예제 #2
0
 /**
  * Deletes specified argument from argument list of the current method.
  *
  * @param string $argumentName Name of argument to delete
  *
  * @return $this
  */
 function deleteArgumentByName($argumentName)
 {
     $this->arguments = Helper::filterByKeys($this->arguments, null, [$argumentName]);
     return $this;
 }
        switch ($method->type) {
            case models\Method::TYPE_ACTION:
                $linkDescription = 'Related Action';
                break;
            case models\Method::TYPE_ACCESSOR:
                $linkDescription = 'Related Accessor';
                break;
            case models\Method::TYPE_ASSERTION:
                $linkDescription = 'Related Assertion';
                break;
        }
        $seeLinks[$method->getNameFQSEN()] = $linkDescription;
    }
    foreach ($methodsGroup as $method) {
        $method->seeLinks += $seeLinks;
        $method->seeLinks = Helper::filterByKeys($method->seeLinks, null, [$method->getNameFQSEN()]);
        // delete link to self
    }
}
// Make plain array of methods
$methods = [];
foreach ($methodsByBaseName as $methodBaseName => $methodsGroup) {
    foreach ($methodsGroup as $method) {
        $methods[] = $method;
    }
}
// Output
if (!file_put_contents('SeleniumTestCaseDoc.generated.php', $generator->generate($methods))) {
    throw new Exception('Error at file write');
}
if (!empty($notFounded)) {