Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into MAGETWO-60347
Browse files Browse the repository at this point in the history
  • Loading branch information
adifucan committed Nov 3, 2016
2 parents 0718f39 + ae9e540 commit 2974487
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/Model/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,7 @@ public function setBaseFile($file)
$path = [
$this->_catalogProductMediaConfig->getBaseMediaPath(),
'cache',
$this->_storeManager->getStore()->getId(),
$path[] = $this->getDestinationSubdir(),
$this->getDestinationSubdir(),
];
if (!empty($this->_width) || !empty($this->_height)) {
$path[] = "{$this->_width}x{$this->_height}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function testSetGetBaseFile()
$this->image->setBaseFile('/somefile.png');
$this->assertEquals('catalog/product/somefile.png', $this->image->getBaseFile());
$this->assertEquals(
'catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
'catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
$this->image->getNewFile()
);
}
Expand Down Expand Up @@ -302,7 +302,7 @@ public function testGetUrl()
$this->testSetGetBaseFile();
$url = $this->image->getUrl();
$this->assertEquals(
'http://magento.com/media/catalog/product/cache/1//beff4985b56e3afdbeabfc89641a4582/somefile.png',
'http://magento.com/media/catalog/product/cache//beff4985b56e3afdbeabfc89641a4582/somefile.png',
$url
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

?>
<div class="block newsletter">
<div class="title"><strong>Newsletter</strong></div>
<div class="title"><strong><?php /* @escapeNotVerified */ echo __('Newsletter') ?></strong></div>
<div class="content">
<form class="form subscribe"
novalidate
Expand Down
40 changes: 24 additions & 16 deletions dev/tests/js/JsTestDriver/run_js_tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
} else {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$browser = 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe';
} elseif (PHP_OS === 'Darwin') {
$browser = '/Applications/Firefox.app/Contents/MacOS/firefox';
} else {
$browser = exec('which firefox');
}
Expand Down Expand Up @@ -139,29 +141,35 @@
kill -9 $LSOF
fi
DISPLAY_NUM=99
ps -ef | egrep "[X]vfb.*:$DISPLAY_NUM"
if [ $? -eq 0 ] ; then
pkill Xvfb
# Skip Xvfb setup for OS X since there browsers do not support headless display that way
if [ "$(uname)" != "Darwin" ]; then
DISPLAY_NUM=99
ps -ef | egrep "[X]vfb.*:$DISPLAY_NUM"
if [ $? -eq 0 ] ; then
pkill Xvfb
fi
XVFB=`which Xvfb`
if [ "$?" -eq 1 ];
then
echo "Xvfb not found."
exit 1
fi
$XVFB :$DISPLAY_NUM -nolisten inet6 -ac &
PID_XVFB="$!" # take the process ID
export DISPLAY=:$DISPLAY_NUM # set display to use that of the Xvfb
fi
XVFB=`which Xvfb`
if [ "$?" -eq 1 ];
then
echo "Xvfb not found."
exit 1
fi
$XVFB :$DISPLAY_NUM -nolisten inet6 -ac &
PID_XVFB="$!" # take the process ID
export DISPLAY=:$DISPLAY_NUM # set display to use that of the Xvfb
USER=`whoami`
SUDO=`which sudo`
# run the tests
$SUDO -u $USER ' . $command . '
kill -9 $PID_XVFB # shut down Xvfb (firefox will shut down cleanly by JsTestDriver)
if [ "$(uname)" != "Darwin" ]; then
kill -9 $PID_XVFB # shut down Xvfb (firefox will shut down cleanly by JsTestDriver)
fi
echo "Done."';

fwrite($fh, $shellCommand . PHP_EOL);
Expand Down
1 change: 1 addition & 0 deletions lib/web/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ define([
}

var settings = {
entity_encoding: 'raw',
mode: (mode != undefined ? mode : 'none'),
elements: this.id,
theme: 'advanced',
Expand Down

0 comments on commit 2974487

Please sign in to comment.