mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
DEP PHP Support in CMS5
This commit is contained in:
parent
4a51782360
commit
29f0b39271
@ -8,19 +8,19 @@
|
|||||||
],
|
],
|
||||||
"type": "silverstripe-vendormodule",
|
"type": "silverstripe-vendormodule",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.4 || ^8.0",
|
"php": "^8.1",
|
||||||
"silverstripe/cms": "^4.0",
|
"silverstripe/cms": "^5",
|
||||||
"silverstripe/lumberjack": "^2.0",
|
"silverstripe/lumberjack": "^3.0",
|
||||||
"silverstripe/tagfield": "^2.0",
|
"silverstripe/tagfield": "^3.0",
|
||||||
"silverstripe/assets": "^1.0",
|
"silverstripe/assets": "^2.0",
|
||||||
"silverstripe/asset-admin": "^1.0"
|
"silverstripe/asset-admin": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"silverstripe/recipe-testing": "^2",
|
"silverstripe/recipe-testing": "^3",
|
||||||
"squizlabs/php_codesniffer": "^3.0",
|
"squizlabs/php_codesniffer": "^3",
|
||||||
"silverstripe/widgets": "^2",
|
"silverstripe/widgets": "^3",
|
||||||
"silverstripe/comments": "^3.7",
|
"silverstripe/comments": "^4",
|
||||||
"silverstripe/content-widget": "^2"
|
"silverstripe/content-widget": "^3"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"expose": [
|
"expose": [
|
||||||
|
@ -11,8 +11,6 @@ class BlogFunctionalTest extends FunctionalTest
|
|||||||
{
|
{
|
||||||
protected static $fixture_file = 'BlogFunctionalTest.yml';
|
protected static $fixture_file = 'BlogFunctionalTest.yml';
|
||||||
|
|
||||||
protected static $use_draft_site = true;
|
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
Config::modify()->set(URLSegmentFilter::class, 'default_allow_multibyte', true);
|
Config::modify()->set(URLSegmentFilter::class, 'default_allow_multibyte', true);
|
||||||
@ -23,14 +21,16 @@ class BlogFunctionalTest extends FunctionalTest
|
|||||||
|
|
||||||
public function testBlogWithMultibyteUrl()
|
public function testBlogWithMultibyteUrl()
|
||||||
{
|
{
|
||||||
$result = $this->get(rawurlencode('آبید'));
|
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
|
||||||
|
$result = $this->get(rawurlencode('آبید') . '?stage=Stage');
|
||||||
|
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$this->assertEquals(200, $result->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMemberProfileWithMultibyteUrlAndName()
|
public function testMemberProfileWithMultibyteUrlAndName()
|
||||||
{
|
{
|
||||||
$result = $this->get(rawurlencode('آبید') . '/profile/' . rawurlencode('عبّاس-آبان'));
|
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
|
||||||
|
$result = $this->get(rawurlencode('آبید') . '/profile/' . rawurlencode('عبّاس-آبان') . '?stage=Stage');
|
||||||
|
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$this->assertEquals(200, $result->getStatusCode());
|
||||||
$this->assertStringContainsString('My Blog Post', $result->getBody());
|
$this->assertStringContainsString('My Blog Post', $result->getBody());
|
||||||
@ -38,7 +38,8 @@ class BlogFunctionalTest extends FunctionalTest
|
|||||||
|
|
||||||
public function testMemberProfileWithMultibyteUrlAndEnglishName()
|
public function testMemberProfileWithMultibyteUrlAndEnglishName()
|
||||||
{
|
{
|
||||||
$result = $this->get(rawurlencode('آبید') . '/profile/bob-jones');
|
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
|
||||||
|
$result = $this->get(rawurlencode('آبید') . '/profile/bob-jones' . '?stage=Stage');
|
||||||
|
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$this->assertEquals(200, $result->getStatusCode());
|
||||||
$this->assertStringContainsString('My Blog Post', $result->getBody());
|
$this->assertStringContainsString('My Blog Post', $result->getBody());
|
||||||
|
@ -11,8 +11,6 @@ class BlogControllerFunctionalTest extends FunctionalTest
|
|||||||
{
|
{
|
||||||
protected static $fixture_file = 'BlogControllerFunctionalTest.yml';
|
protected static $fixture_file = 'BlogControllerFunctionalTest.yml';
|
||||||
|
|
||||||
protected static $use_draft_site = true;
|
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
Config::modify()->set(URLSegmentFilter::class, 'default_allow_multibyte', true);
|
Config::modify()->set(URLSegmentFilter::class, 'default_allow_multibyte', true);
|
||||||
@ -23,7 +21,8 @@ class BlogControllerFunctionalTest extends FunctionalTest
|
|||||||
|
|
||||||
public function testGetCategoriesWithMultibyteUrl()
|
public function testGetCategoriesWithMultibyteUrl()
|
||||||
{
|
{
|
||||||
$result = $this->get('my-blog/category/' . rawurlencode('آبید'));
|
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
|
||||||
|
$result = $this->get('my-blog/category/' . rawurlencode('آبید') . '?stage=Stage');
|
||||||
|
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$this->assertEquals(200, $result->getStatusCode());
|
||||||
$this->assertStringContainsString('آبید', $result->getBody());
|
$this->assertStringContainsString('آبید', $result->getBody());
|
||||||
@ -31,7 +30,8 @@ class BlogControllerFunctionalTest extends FunctionalTest
|
|||||||
|
|
||||||
public function testGetTagsWithMultibyteUrl()
|
public function testGetTagsWithMultibyteUrl()
|
||||||
{
|
{
|
||||||
$result = $this->get('my-blog/tag/' . rawurlencode('برتراند'));
|
$this->logInWithPermission('VIEW_DRAFT_CONTENT');
|
||||||
|
$result = $this->get('my-blog/tag/' . rawurlencode('برتراند') . '?stage=Stage');
|
||||||
|
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$this->assertEquals(200, $result->getStatusCode());
|
||||||
$this->assertStringContainsString('برتراند', $result->getBody());
|
$this->assertStringContainsString('برتراند', $result->getBody());
|
||||||
|
Loading…
Reference in New Issue
Block a user