mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1772 from dhensby/pulls/test-update
Test fixes for upstream changes
This commit is contained in:
commit
83e0947b24
@ -4,10 +4,6 @@
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
|
||||
<listeners>
|
||||
<listener class="SilverStripe\Dev\TestListener" />
|
||||
</listeners>
|
||||
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">.</directory>
|
||||
|
@ -10,6 +10,12 @@ use SilverStripe\Dev\SapphireTest;
|
||||
class ContentControllerSearchExtensionTest extends SapphireTest
|
||||
{
|
||||
|
||||
protected static $required_extensions = array(
|
||||
ContentController::class => [
|
||||
\SilverStripe\CMS\Search\ContentControllerSearchExtension::class,
|
||||
],
|
||||
);
|
||||
|
||||
public function testCustomSearchFormClassesToTest()
|
||||
{
|
||||
$page = new Page();
|
||||
@ -25,9 +31,9 @@ class ContentControllerSearchExtensionTest extends SapphireTest
|
||||
}
|
||||
}
|
||||
|
||||
public function setUpOnce()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
parent::setUpOnce();
|
||||
parent::setUpBeforeClass();
|
||||
|
||||
FulltextSearchable::enable('SilverStripe\\Assets\\File');
|
||||
}
|
||||
@ -37,9 +43,9 @@ class ContentControllerSearchExtensionTest extends SapphireTest
|
||||
* properly at the end of the test. This becomes apparent when a later test tries to
|
||||
* ALTER TABLE File and add fulltext indexes with the InnoDB table type.
|
||||
*/
|
||||
public function tearDownOnce()
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
parent::tearDownOnce();
|
||||
parent::tearDownAfterClass();
|
||||
|
||||
Config::inst()->update('SilverStripe\\Assets\\File', 'create_table_options', array('SilverStripe\ORM\Connect\MySQLDatabase' => 'ENGINE=InnoDB'));
|
||||
File::remove_extension('SilverStripe\\ORM\\Search\\FulltextSearchable');
|
||||
|
@ -16,7 +16,7 @@ class SiteTreeBacklinksTest extends SapphireTest
|
||||
{
|
||||
protected static $fixture_file = "SiteTreeBacklinksTest.yml";
|
||||
|
||||
protected $requiredExtensions = array(
|
||||
protected static $required_extensions = array(
|
||||
'SilverStripe\\CMS\\Model\\SiteTree' => array('SiteTreeBacklinksTest_DOD'),
|
||||
);
|
||||
|
||||
|
@ -20,7 +20,7 @@ class SiteTreePermissionsTest extends FunctionalTest
|
||||
{
|
||||
protected static $fixture_file = "SiteTreePermissionsTest.yml";
|
||||
|
||||
protected $illegalExtensions = array(
|
||||
protected static $illegal_extensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites')
|
||||
);
|
||||
|
||||
|
@ -37,11 +37,11 @@ class SiteTreeTest extends SapphireTest
|
||||
|
||||
protected static $fixture_file = 'SiteTreeTest.yml';
|
||||
|
||||
protected $illegalExtensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites', 'Translatable')
|
||||
protected static $illegal_extensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites', 'Translatable'),
|
||||
);
|
||||
|
||||
protected $extraDataObjects = array(
|
||||
protected static $extra_dataobjects = array(
|
||||
SiteTreeTest_ClassA::class,
|
||||
SiteTreeTest_ClassB::class,
|
||||
SiteTreeTest_ClassC::class,
|
||||
|
@ -20,7 +20,7 @@ class VirtualPageTest extends FunctionalTest
|
||||
protected static $use_draft_site = false;
|
||||
protected $autoFollowRedirection = false;
|
||||
|
||||
protected $extraDataObjects = array(
|
||||
protected static $extra_dataobjects = array(
|
||||
'VirtualPageTest_ClassA',
|
||||
'VirtualPageTest_ClassB',
|
||||
'VirtualPageTest_ClassC',
|
||||
@ -31,11 +31,11 @@ class VirtualPageTest extends FunctionalTest
|
||||
'VirtualPageTest_VirtualPageSub',
|
||||
);
|
||||
|
||||
protected $illegalExtensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites', 'Translatable')
|
||||
protected static $illegal_extensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites', 'Translatable'),
|
||||
);
|
||||
|
||||
protected $requiredExtensions = array(
|
||||
protected static $required_extensions = array(
|
||||
SiteTree::class => array('VirtualPageTest_PageExtension')
|
||||
);
|
||||
|
||||
|
@ -29,7 +29,7 @@ class ZZZSearchFormTest extends FunctionalTest
|
||||
|
||||
protected static $fixture_file = 'SearchFormTest.yml';
|
||||
|
||||
protected $illegalExtensions = array(
|
||||
protected static $illegal_extensions = array(
|
||||
SiteTree::class => array('SiteTreeSubsites', 'Translatable')
|
||||
);
|
||||
|
||||
@ -46,16 +46,16 @@ class ZZZSearchFormTest extends FunctionalTest
|
||||
}
|
||||
}
|
||||
|
||||
public function setUpOnce()
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
// HACK Postgres doesn't refresh TSearch indexes when the schema changes after CREATE TABLE
|
||||
// MySQL will need a different table type
|
||||
self::kill_temp_db();
|
||||
static::kill_temp_db();
|
||||
Config::modify();
|
||||
FulltextSearchable::enable();
|
||||
self::create_temp_db();
|
||||
$this->resetDBSchema(true);
|
||||
parent::setUpOnce();
|
||||
static::create_temp_db();
|
||||
static::resetDBSchema(true);
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
|
Loading…
Reference in New Issue
Block a user