@@ -91,6 +91,9 @@ |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $textDomain |
|
| 96 | + */ |
|
| 94 | 97 | protected function translatePart($translate, $result, $textDomain, $locale) |
| 95 | 98 | { |
| 96 | 99 | $newResult = parent::translate($result, $textDomain, $locale); |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$this->baseUrl = 'http://magento19.loc//'; |
|
| 4 | 3 | \ No newline at end of file |
| 4 | +$this->baseUrl = 'http://magento19.loc//'; |
|
| 5 | 5 | \ No newline at end of file |
@@ -2,4 +2,4 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Magium\Extractors\Navigation; |
| 4 | 4 | |
| 5 | -class UnableToExtractMenuXpathException extends \Exception{} |
|
| 6 | 5 | \ No newline at end of file |
| 6 | +class UnableToExtractMenuXpathException extends \Exception {} |
|
| 7 | 7 | \ No newline at end of file |
@@ -2,4 +2,4 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Magium\Extractors\Navigation; |
| 4 | 4 | |
| 5 | -class MissingNavigationSchemeException extends \Exception{} |
|
| 6 | 5 | \ No newline at end of file |
| 6 | +class MissingNavigationSchemeException extends \Exception {} |
|
| 7 | 7 | \ No newline at end of file |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | $this->name = trim(array_pop($rows)); |
| 32 | 32 | while (count($rows) > 0) { |
| 33 | 33 | $row = array_shift($rows); |
| 34 | - if (strpos($row, 'T: ') ===0) { |
|
| 34 | + if (strpos($row, 'T: ') === 0) { |
|
| 35 | 35 | $this->phone = trim(substr($row, 3)); |
| 36 | 36 | continue; |
| 37 | - } else if (strpos($row, 'F: ') ===0) { |
|
| 37 | + } else if (strpos($row, 'F: ') === 0) { |
|
| 38 | 38 | $this->fax = trim(substr($row, 3)); |
| 39 | 39 | continue; |
| 40 | 40 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->street1 = trim(array_shift($rows)); |
| 60 | 60 | $this->business = trim(array_shift($rows)); |
| 61 | 61 | //Easy |
| 62 | - }else if (count($rows) == 1) { |
|
| 62 | + } else if (count($rows) == 1) { |
|
| 63 | 63 | $this->street1 = trim(array_shift($rows)); |
| 64 | 64 | |
| 65 | 65 | // Not so easy |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $this->street1 = $stOrBus; |
| 71 | 71 | $this->business = trim(array_shift($rows)); |
| 72 | 72 | } else { |
| 73 | - $this->street1 =trim(array_shift($rows)); |
|
| 74 | - $this->street2 = $stOrBus; |
|
| 73 | + $this->street1 = trim(array_shift($rows)); |
|
| 74 | + $this->street2 = $stOrBus; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | } |
| 32 | 32 | try { |
| 33 | 33 | $assertion->assert(); |
| 34 | - $this->logger->logAssertionSuccess( $assertion, $extra ); |
|
| 34 | + $this->logger->logAssertionSuccess($assertion, $extra); |
|
| 35 | 35 | } catch (\Exception $e) { |
| 36 | 36 | $this->logger->logAssertionFailure($assertion, $extra); |
| 37 | 37 | throw $e; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public static function elementExists($selector, $by = 'byId') |
| 12 | 12 | { |
| 13 | 13 | return new WebDriverExpectedCondition( |
| 14 | - function ($driver) use ($selector, $by) { |
|
| 14 | + function($driver) use ($selector, $by) { |
|
| 15 | 15 | try { |
| 16 | 16 | $element = $driver->$by($selector); |
| 17 | 17 | return $element instanceof WebDriverElement; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public static function elementRemoved(WebDriverElement $element) |
| 27 | 27 | { |
| 28 | 28 | return new WebDriverExpectedCondition( |
| 29 | - function () use ($element) { |
|
| 29 | + function() use ($element) { |
|
| 30 | 30 | try { |
| 31 | 31 | $element->isDisplayed(); |
| 32 | 32 | return false; |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | |
| 99 | 99 | sort($paths); |
| 100 | 100 | $filter = $input->getArgument('filter'); |
| 101 | - if (count($paths) > 0 ) { |
|
| 101 | + if (count($paths) > 0) { |
|
| 102 | 102 | $output->writeln('Classes found: '); |
| 103 | 103 | $escape = $input->getOption('escape'); |
| 104 | 104 | |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - public static function resolveClass( $class, $prefix = null) |
|
| 237 | + public static function resolveClass($class, $prefix = null) |
|
| 238 | 238 | { |
| 239 | 239 | $origClass = $class; |
| 240 | 240 | if ($prefix !== null) { |
@@ -251,6 +251,9 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | + /** |
|
| 255 | + * @param null|string $selector |
|
| 256 | + */ |
|
| 254 | 257 | public function assertElementClickable($selector, $by = WebDriver::BY_ID) |
| 255 | 258 | { |
| 256 | 259 | $this->elementAssertion($selector, $by, Clickable::ASSERTION); |
@@ -268,6 +271,9 @@ discard block |
||
| 268 | 271 | $this->testCaseConfiguration = $class; |
| 269 | 272 | } |
| 270 | 273 | |
| 274 | + /** |
|
| 275 | + * @param string $namespace |
|
| 276 | + */ |
|
| 271 | 277 | public static function addBaseNamespace($namespace) |
| 272 | 278 | { |
| 273 | 279 | if (!in_array($namespace, self::$baseNamespaces)) { |
@@ -275,6 +281,9 @@ discard block |
||
| 275 | 281 | } |
| 276 | 282 | } |
| 277 | 283 | |
| 284 | + /** |
|
| 285 | + * @param string $prefix |
|
| 286 | + */ |
|
| 278 | 287 | public static function resolveClass( $class, $prefix = null) |
| 279 | 288 | { |
| 280 | 289 | $origClass = $class; |
@@ -306,6 +315,9 @@ discard block |
||
| 306 | 315 | |
| 307 | 316 | } |
| 308 | 317 | |
| 318 | + /** |
|
| 319 | + * @return string |
|
| 320 | + */ |
|
| 309 | 321 | protected function normalizeClassRequest($class) |
| 310 | 322 | { |
| 311 | 323 | return str_replace('/', '\\', $class); |
@@ -398,7 +410,7 @@ discard block |
||
| 398 | 410 | * |
| 399 | 411 | * Options: 1s (1 second), 1ms (1 millisecond), 1us (1 microsecond), 1ns (1 nanosecond) |
| 400 | 412 | * |
| 401 | - * @param $time |
|
| 413 | + * @param string $time |
|
| 402 | 414 | */ |
| 403 | 415 | |
| 404 | 416 | public function sleep($time) |
@@ -600,7 +612,7 @@ discard block |
||
| 600 | 612 | } |
| 601 | 613 | |
| 602 | 614 | /** |
| 603 | - * @param $xpath |
|
| 615 | + * @param string $xpath |
|
| 604 | 616 | * @return \Facebook\WebDriver\Remote\RemoteWebElement |
| 605 | 617 | */ |
| 606 | 618 | |
@@ -629,6 +641,12 @@ discard block |
||
| 629 | 641 | return $this->webdriver->byCssSelector($selector); |
| 630 | 642 | } |
| 631 | 643 | |
| 644 | + /** |
|
| 645 | + * @param string $xpathTemplate |
|
| 646 | + * @param string $text |
|
| 647 | + * @param string $specificNodeType |
|
| 648 | + * @param string $parentElementSelector |
|
| 649 | + */ |
|
| 632 | 650 | protected function getElementByTextXpath($xpathTemplate, $text, $specificNodeType = null, $parentElementSelector = null) |
| 633 | 651 | { |
| 634 | 652 | |