@@ -48,9 +48,9 @@ |
||
48 | 48 | $test->setCategoryPath($input->getArgument('category')); |
49 | 49 | $test->run(); |
50 | 50 | $products = $test->getProductNames(); |
51 | - $output->writeln('Found ' . count($products) . ' products in ' . $input->getArgument('category')); |
|
51 | + $output->writeln('Found '.count($products).' products in '.$input->getArgument('category')); |
|
52 | 52 | foreach ($products as $product) { |
53 | - $output->writeln("\t" . trim($product)); |
|
53 | + $output->writeln("\t".trim($product)); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 |
@@ -12,11 +12,11 @@ |
||
12 | 12 | $origClass = $class; |
13 | 13 | |
14 | 14 | if (!class_exists($class)) { |
15 | - $class = $origClass . '\ThemeConfiguration'; |
|
15 | + $class = $origClass.'\ThemeConfiguration'; |
|
16 | 16 | if (!class_exists($class)) { |
17 | - $class = 'Magium\Magento\Themes\\' . $origClass . '\ThemeConfiguration'; |
|
17 | + $class = 'Magium\Magento\Themes\\'.$origClass.'\ThemeConfiguration'; |
|
18 | 18 | if (!class_exists($class)) { |
19 | - throw new NotFoundException('Could not resolve the theme class for: ' . $origClass); |
|
19 | + throw new NotFoundException('Could not resolve the theme class for: '.$origClass); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function extract() |
33 | 33 | { |
34 | 34 | if (!$this->webDriver->elementExists($this->theme->getAddToCartXpath(), 'byXpath')) { |
35 | - throw new NoSuchElementException('Could not find the simple add to cart element with the Xpath: ' . $this->theme->getAddToCartXpath()); |
|
35 | + throw new NoSuchElementException('Could not find the simple add to cart element with the Xpath: '.$this->theme->getAddToCartXpath()); |
|
36 | 36 | }; |
37 | 37 | |
38 | 38 | $elements = $this->webDriver->findElements(WebDriverBy::xpath($this->theme->getAddToCartXpath())); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @var AbstractThemeConfiguration |
19 | 19 | */ |
20 | - protected $theme; // Here for code completion assistance |
|
20 | + protected $theme; // Here for code completion assistance |
|
21 | 21 | |
22 | 22 | public function __construct(WebDriver $webDriver, AbstractTestCase $testCase, AbstractThemeConfiguration $theme) |
23 | 23 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return $value; |
52 | 52 | } |
53 | 53 | } |
54 | - throw new MissingValueException('Could not find the value for option: ' . $text); |
|
54 | + throw new MissingValueException('Could not find the value for option: '.$text); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | throw new UnparseableValueException('Unable to determine the link'); |
110 | 110 | } |
111 | 111 | |
112 | - $linkElementXpath = $this->theme->getLayeredNavigationFilterLinkXpath($this->title) . sprintf('[@href="%s"]', $linkUrl); |
|
112 | + $linkElementXpath = $this->theme->getLayeredNavigationFilterLinkXpath($this->title).sprintf('[@href="%s"]', $linkUrl); |
|
113 | 113 | $linkElement = $this->webDriver->byXpath($linkElementXpath); |
114 | 114 | |
115 | 115 | $value = new FilterValue($linkElement, $text, $linkUrl, $count); |
@@ -105,7 +105,7 @@ |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | if ($name === null) { |
108 | - throw new MissingSwatchNameException('Unable to extract the swatch name from HTML: ' . $element->getAttribute('innerHTML')); |
|
108 | + throw new MissingSwatchNameException('Unable to extract the swatch name from HTML: '.$element->getAttribute('innerHTML')); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $isSwatch = $this->swatchProcessor->isConfigurableSwatch($count+1); |
@@ -27,19 +27,19 @@ |
||
27 | 27 | { |
28 | 28 | $translator = $this->testCase->getTranslator(); |
29 | 29 | $baseXpath = '//h4[contains(concat(" ",normalize-space(@class)," ")," head-products ")]/../../following-sibling::div[1]/descendant::tr[%d]'; |
30 | - $titleXpath = $baseXpath . '/descendant::div[contains(concat(" ",normalize-space(@class)," ")," item-text ")]/h5'; |
|
31 | - $skuXpath = $baseXpath . '/descendant::div[contains(concat(" ",normalize-space(@class)," ")," item-text ")]/div'; |
|
32 | - $itemStatusXpath = $baseXpath . '/td[2]'; |
|
33 | - $originalPriceXpath = $baseXpath . '/td[3]/span'; |
|
34 | - $priceXpath = $baseXpath . '/td[4]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
35 | - $orderedQtyXpath = $baseXpath . sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Ordered')); |
|
36 | - $invoicedQtyXpath = $baseXpath . sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Invoiced')); |
|
37 | - $shippedQtyXpath = $baseXpath . sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Shipped')); |
|
38 | - $subtotalXpath = $baseXpath . '/td[6]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
39 | - $taxXpath = $baseXpath . '/td[7]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
40 | - $taxPercentXpath = $baseXpath . '/td[8]'; |
|
41 | - $discountAmountXpath = $baseXpath . '/td[9]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
42 | - $rowTotalXpath = $baseXpath . '/td[10]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
30 | + $titleXpath = $baseXpath.'/descendant::div[contains(concat(" ",normalize-space(@class)," ")," item-text ")]/h5'; |
|
31 | + $skuXpath = $baseXpath.'/descendant::div[contains(concat(" ",normalize-space(@class)," ")," item-text ")]/div'; |
|
32 | + $itemStatusXpath = $baseXpath.'/td[2]'; |
|
33 | + $originalPriceXpath = $baseXpath.'/td[3]/span'; |
|
34 | + $priceXpath = $baseXpath.'/td[4]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
35 | + $orderedQtyXpath = $baseXpath.sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Ordered')); |
|
36 | + $invoicedQtyXpath = $baseXpath.sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Invoiced')); |
|
37 | + $shippedQtyXpath = $baseXpath.sprintf('/td[5]/descendant::td[.="%s"]/../td/strong', $translator->translate('Shipped')); |
|
38 | + $subtotalXpath = $baseXpath.'/td[6]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
39 | + $taxXpath = $baseXpath.'/td[7]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
40 | + $taxPercentXpath = $baseXpath.'/td[8]'; |
|
41 | + $discountAmountXpath = $baseXpath.'/td[9]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
42 | + $rowTotalXpath = $baseXpath.'/td[10]/descendant::span[contains(concat(" ",normalize-space(@class)," ")," price ")]'; |
|
43 | 43 | |
44 | 44 | $count = 2; // To take into account the order items header |
45 | 45 | while ($this->webDriver->elementExists(sprintf($skuXpath, $count), WebDriver::BY_XPATH)) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $xpath = '//h4[contains(concat(" ",normalize-space(@class)," ")," head-payment-method ")]/../../descendant::fieldset'; |
41 | 41 | |
42 | - $currencyXpath = $xpath . '/div'; |
|
42 | + $currencyXpath = $xpath.'/div'; |
|
43 | 43 | |
44 | 44 | $currencyElement = $this->webDriver->byXpath($currencyXpath); |
45 | 45 | $currencyText = trim($currencyElement->getText()); |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -\Magium\Cli\CommandLoader::addCommandDir('Magium\Magento\Cli\Command', realpath(__DIR__ . '/lib/Magento/Cli/Command')); |
|
4 | -\Magium\Cli\Command\ListElements::addDirectory(realpath(__DIR__ . '/lib'), 'Magium'); |
|
5 | 3 | \ No newline at end of file |
4 | +\Magium\Cli\CommandLoader::addCommandDir('Magium\Magento\Cli\Command', realpath(__DIR__.'/lib/Magento/Cli/Command')); |
|
5 | +\Magium\Cli\Command\ListElements::addDirectory(realpath(__DIR__.'/lib'), 'Magium'); |
|
6 | 6 | \ No newline at end of file |