mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge remote-tracking branch 'origin/3.1.0' into 3.1
Conflicts: dev/BehatFixtureFactory.php model/Hierarchy.php tests/behat/features/bootstrap/FeatureContext.php tests/core/CoreTest.php
This commit is contained in:
commit
4a3a88710f
@ -158,7 +158,7 @@ class Hierarchy extends DataExtension {
|
|||||||
} else {
|
} else {
|
||||||
$output .= $child->getChildrenAsUL("", $titleEval, $extraArg, $limitToMarked,
|
$output .= $child->getChildrenAsUL("", $titleEval, $extraArg, $limitToMarked,
|
||||||
$childrenMethod, $numChildrenMethod, false, $nodeCountThreshold);
|
$childrenMethod, $numChildrenMethod, false, $nodeCountThreshold);
|
||||||
}
|
}
|
||||||
} elseif($child->isTreeOpened()) {
|
} elseif($child->isTreeOpened()) {
|
||||||
// Since we're not loading children, don't mark it as open either
|
// Since we're not loading children, don't mark it as open either
|
||||||
$child->markClosed();
|
$child->markClosed();
|
||||||
@ -497,7 +497,7 @@ class Hierarchy extends DataExtension {
|
|||||||
$this->_cache_children = $result->filterByCallback(function($item) {
|
$this->_cache_children = $result->filterByCallback(function($item) {
|
||||||
return $item->canView();
|
return $item->canView();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return $this->_cache_children;
|
return $this->_cache_children;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class FeatureContext extends SilverStripeContext
|
|||||||
* Initializes context.
|
* Initializes context.
|
||||||
* Every scenario gets it's own context object.
|
* Every scenario gets it's own context object.
|
||||||
*
|
*
|
||||||
* @param array $parameters context parameters (set them up through behat.yml)
|
* @param array $parameters context parameters (set them up through behat.yml)
|
||||||
*/
|
*/
|
||||||
public function __construct(array $parameters)
|
public function __construct(array $parameters)
|
||||||
{
|
{
|
||||||
|
@ -246,10 +246,13 @@ class CmsUiContext extends BehatContext
|
|||||||
public function thePreviewContains($content)
|
public function thePreviewContains($content)
|
||||||
{
|
{
|
||||||
$driver = $this->getSession()->getDriver();
|
$driver = $this->getSession()->getDriver();
|
||||||
$driver->switchToIFrame('cms-preview-iframe');
|
// TODO Remove once we have native support in Mink and php-webdriver,
|
||||||
|
// see https://groups.google.com/forum/#!topic/behat/QNhOuGHKEWI
|
||||||
|
$origWindowName = $driver->getWebDriverSession()->window_handle();
|
||||||
|
|
||||||
|
$driver->switchToIFrame('cms-preview-iframe');
|
||||||
$this->getMainContext()->assertPageContainsText($content);
|
$this->getMainContext()->assertPageContainsText($content);
|
||||||
$driver->switchToWindow();
|
$driver->switchToWindow($origWindowName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -304,10 +307,13 @@ class CmsUiContext extends BehatContext
|
|||||||
public function thePreviewDoesNotContain($content)
|
public function thePreviewDoesNotContain($content)
|
||||||
{
|
{
|
||||||
$driver = $this->getSession()->getDriver();
|
$driver = $this->getSession()->getDriver();
|
||||||
$driver->switchToIFrame('cms-preview-iframe');
|
// TODO Remove once we have native support in Mink and php-webdriver,
|
||||||
|
// see https://groups.google.com/forum/#!topic/behat/QNhOuGHKEWI
|
||||||
|
$origWindowName = $driver->getWebDriverSession()->window_handle();
|
||||||
|
|
||||||
|
$driver->switchToIFrame('cms-preview-iframe');
|
||||||
$this->getMainContext()->assertPageNotContainsText($content);
|
$this->getMainContext()->assertPageNotContainsText($content);
|
||||||
$driver->switchToWindow();
|
$driver->switchToWindow($origWindowName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +34,7 @@ class CoreTest extends SapphireTest {
|
|||||||
getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'));
|
getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'));
|
||||||
|
|
||||||
// A typical Linux location for where sites are stored
|
// A typical Linux location for where sites are stored
|
||||||
$this->assertEquals(sys_get_temp_dir() .'/silverstripe-cache-var-www-silverstripe-test-project/' . $user,
|
$this->assertEquals(sys_get_temp_dir() . '/silverstripe-cache-var-www-silverstripe-test-project/' . $user,
|
||||||
getTempFolder('/var/www/silverstripe-test-project'));
|
getTempFolder('/var/www/silverstripe-test-project'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user