mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
FIX Replace static assertions with instance calls
This commit is contained in:
parent
7ffaf61aeb
commit
c081de1202
@ -40,6 +40,6 @@ class SiteConfigSubsitesTest extends BaseSubsiteTest
|
||||
$this->assertEquals('Subsite2', SiteConfig::current_site_config()->Title);
|
||||
|
||||
$keys = SiteConfig::current_site_config()->extend('cacheKeyComponent');
|
||||
static::assertContains('subsite-' . $subsite2->ID, $keys);
|
||||
$this->assertContains('subsite-' . $subsite2->ID, $keys);
|
||||
}
|
||||
}
|
||||
|
@ -255,16 +255,16 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest
|
||||
Subsite::changeSubsite($s1);
|
||||
$hints = Convert::json2array($cmsmain->SiteTreeHints());
|
||||
$classes = $hints['Root']['disallowedChildren'];
|
||||
static::assertContains(ErrorPage::class, $classes);
|
||||
static::assertContains(TestClassA::class, $classes);
|
||||
static::assertNotContains(TestClassB::class, $classes);
|
||||
$this->assertContains(ErrorPage::class, $classes);
|
||||
$this->assertContains(TestClassA::class, $classes);
|
||||
$this->assertNotContains(TestClassB::class, $classes);
|
||||
|
||||
Subsite::changeSubsite($s2);
|
||||
$hints = Convert::json2array($cmsmain->SiteTreeHints());
|
||||
$classes = $hints['Root']['disallowedChildren'];
|
||||
static::assertNotContains(ErrorPage::class, $classes);
|
||||
static::assertNotContains(TestClassA::class, $classes);
|
||||
static::assertNotContains(TestClassB::class, $classes);
|
||||
$this->assertNotContains(ErrorPage::class, $classes);
|
||||
$this->assertNotContains(TestClassA::class, $classes);
|
||||
$this->assertNotContains(TestClassB::class, $classes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,9 +37,9 @@ class SubsiteXHRControllerTest extends FunctionalTest
|
||||
$this->assertEquals(200, $result->getStatusCode());
|
||||
$this->assertEquals('text/json', $result->getHeader('Content-Type'));
|
||||
$body = $result->getBody();
|
||||
static::assertContains('Main site', $body);
|
||||
static::assertContains('Test 1', $body);
|
||||
static::assertContains('Test 2', $body);
|
||||
static::assertContains('Test 3', $body);
|
||||
$this->assertContains('Main site', $body);
|
||||
$this->assertContains('Test 1', $body);
|
||||
$this->assertContains('Test 2', $body);
|
||||
$this->assertContains('Test 3', $body);
|
||||
}
|
||||
}
|
||||
|
@ -97,11 +97,11 @@ class SubsitesVirtualPageTest extends BaseSubsiteTest
|
||||
$file->write();
|
||||
|
||||
// Verify that the draft and publish virtual pages both have the corrected link
|
||||
static::assertContains(
|
||||
$this->assertContains(
|
||||
'<img src="/assets/SubsitesVirtualPageTest/464dedb70a/renamed-test-file.pdf"',
|
||||
DB::query("SELECT \"Content\" FROM \"SiteTree\" WHERE \"ID\" = $svp->ID")->value()
|
||||
);
|
||||
static::assertContains(
|
||||
$this->assertContains(
|
||||
'<img src="/assets/SubsitesVirtualPageTest/464dedb70a/renamed-test-file.pdf"',
|
||||
DB::query("SELECT \"Content\" FROM \"SiteTree_Live\" WHERE \"ID\" = $svp->ID")->value()
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user