-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEP PHP Support in CMS5 #693
DEP PHP Support in CMS5 #693
Conversation
dd69ac8
to
145334b
Compare
c9d114d
to
ed3321c
Compare
Created new card for failed Behat tests #696 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Just curious about why the changes to the test were needed.
tests/php/BlogFunctionalTest.php
Outdated
@@ -23,22 +21,25 @@ protected function setUp(): void | |||
|
|||
public function testBlogWithMultibyteUrl() | |||
{ | |||
$result = $this->get(rawurlencode('آبید')); | |||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User doesn't have an access to the Draft page without Admin permission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered my own question.
I just think we should use the more minimal VIEW_DRAFT_CONTENT
permission to run the test.
tests/php/BlogFunctionalTest.php
Outdated
@@ -23,22 +21,25 @@ protected function setUp(): void | |||
|
|||
public function testBlogWithMultibyteUrl() | |||
{ | |||
$result = $this->get(rawurlencode('آبید')); | |||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
tests/php/BlogFunctionalTest.php
Outdated
|
||
$this->assertEquals(200, $result->getStatusCode()); | ||
} | ||
|
||
public function testMemberProfileWithMultibyteUrlAndName() | ||
{ | ||
$result = $this->get(rawurlencode('آبید') . '/profile/' . rawurlencode('عبّاس-آبان')); | ||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
tests/php/BlogFunctionalTest.php
Outdated
|
||
$this->assertEquals(200, $result->getStatusCode()); | ||
$this->assertStringContainsString('My Blog Post', $result->getBody()); | ||
} | ||
|
||
public function testMemberProfileWithMultibyteUrlAndEnglishName() | ||
{ | ||
$result = $this->get(rawurlencode('آبید') . '/profile/bob-jones'); | ||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
@@ -23,15 +21,17 @@ protected function setUp(): void | |||
|
|||
public function testGetCategoriesWithMultibyteUrl() | |||
{ | |||
$result = $this->get('my-blog/category/' . rawurlencode('آبید')); | |||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
|
||
$this->assertEquals(200, $result->getStatusCode()); | ||
$this->assertStringContainsString('آبید', $result->getBody()); | ||
} | ||
|
||
public function testGetTagsWithMultibyteUrl() | ||
{ | ||
$result = $this->get('my-blog/tag/' . rawurlencode('برتراند')); | ||
$this->logInWithPermission('ADMIN'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->logInWithPermission('ADMIN'); | |
$this->logInWithPermission('VIEW_DRAFT_CONTENT'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
ed3321c
to
29f0b39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Parent issue