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:
Ingo Schommer 2013-08-22 13:00:25 +02:00
commit 4a3a88710f
5 changed files with 22 additions and 16 deletions

View File

@ -246,10 +246,13 @@ class CmsUiContext extends BehatContext
public function thePreviewContains($content)
{
$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);
$driver->switchToWindow();
$driver->switchToWindow($origWindowName);
}
/**
@ -304,10 +307,13 @@ class CmsUiContext extends BehatContext
public function thePreviewDoesNotContain($content)
{
$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);
$driver->switchToWindow();
$driver->switchToWindow($origWindowName);
}
/**

View File

@ -34,7 +34,7 @@ class CoreTest extends SapphireTest {
getTempFolder('/Users/joebloggs/Sites/silverstripe-test-project'));
// 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'));
}
}