Skip to content

Commit 2fea162

Browse files
authored
Merge pull request #410 from phalcon/3.x
3.3.2
2 parents 465606d + 534860a commit 2fea162

File tree

5 files changed

+100
-4
lines changed

5 files changed

+100
-4
lines changed

app/library/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Version extends PhVersion
3434
*/
3535
protected static function _getVersion()
3636
{
37-
return [3, 3, 1, 0, 0];
37+
return [3, 3, 2, 0, 0];
3838
}
3939
// @codingStandardsIgnoreEnd
4040
}

app/views/partials/post/reply.volt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<div class="post-content">
6767
{%- cache "reply-body-" ~ reply.id -%}
6868
<div itemprop="text">
69-
{{- markdown.render(reply.content|e) -}}
69+
{{- markdown.render(reply.content) -}}
7070
</div>
7171
{%- endcache -%}
7272
</div>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?php
2+
3+
/*
4+
+------------------------------------------------------------------------+
5+
| Phalcon forum |
6+
+------------------------------------------------------------------------+
7+
| Copyright (c) 2011-2017 Phalcon Team (https://www.phalconphp.com) |
8+
+------------------------------------------------------------------------+
9+
| This source file is subject to the New BSD License that is bundled |
10+
| with this package in the file LICENSE.txt. |
11+
| |
12+
| If you did not receive a copy of the license and are unable to |
13+
| obtain it through the world-wide-web, please send an email |
14+
| to [email protected] so we can send you a copy immediately. |
15+
+------------------------------------------------------------------------+
16+
| Authors: Sergii Svyrydenko <[email protected]> |
17+
+------------------------------------------------------------------------+
18+
*/
19+
20+
use Helper\Post;
21+
use Helper\User;
22+
use Helper\Category;
23+
24+
class PostAndReplyTestCest
25+
{
26+
/** @var Category */
27+
protected $category;
28+
29+
/** @var User */
30+
protected $user;
31+
32+
/** @var Post */
33+
protected $post;
34+
35+
36+
protected function _inject(Category $category, User $user, Post $post)
37+
{
38+
$this->user = $user;
39+
$this->post = $post;
40+
$this->category = $category;
41+
}
42+
43+
public function shouldCreatePostWithCorrectSymbols(AcceptanceTester $I)
44+
{
45+
$I->wantTo("Check special symbols in post's text");
46+
47+
$user = $this->user->haveUser();
48+
$catId = $this->category->haveCategory();
49+
50+
$postId = $this->post->havePost([
51+
'title' => 'Test special symbols in post text',
52+
'content' => "Code < > ' ! <h1>Code content < </h1> `{<h2>Code content2 > ' </h2>}`",
53+
'slug' => 'test_spec_sumbol',
54+
'users_id' => $user['id'],
55+
'categories_id' => $catId,
56+
]);
57+
58+
$I->amOnPage("/discussion/{$postId}/test_spec_sumbol");
59+
$I->seeInSource('Test special symbols in post text');
60+
61+
$I->seeInSource("Code &lt; &gt; ' !");
62+
$I->seeInSource("&lt;h1&gt;Code content &lt; &lt;/h1&gt;");
63+
$I->seeInSource("&lt;h2&gt;Code content2 &gt; ' &lt;/h2&gt;");
64+
}
65+
66+
public function shouldCreateReplyWithCorrectSymbols(AcceptanceTester $I)
67+
{
68+
$I->wantTo("Check special symbols in post's reply");
69+
70+
$user = $this->user->haveUser();
71+
$catId = $this->category->haveCategory();
72+
73+
$postId = $this->post->havePost([
74+
'title' => 'Test special symbols in post reply',
75+
'content' => "Test Reply",
76+
'slug' => 'test_spec_reply',
77+
'users_id' => $user['id'],
78+
'categories_id' => $catId,
79+
]);
80+
81+
$I->amOnPage("/discussion/{$postId}/test_spec_reply");
82+
$I->seeInSource('Test special symbols in post reply');
83+
84+
$replyId = $this->post->havePostReply([
85+
'posts_id' => $postId,
86+
'users_id' => $user['id'],
87+
'accepted' => 'N',
88+
'content' => "Code < > ' ! <h1>Code content < </h1> `{<h2>Code content > ' </h2>}`",
89+
]);
90+
91+
$I->amOnPage("/discussion/{$postId}/test_spec_reply#{$replyId}");
92+
$I->seeInSource("Code &lt; &gt; ' !");
93+
$I->seeInSource("&lt;h1&gt;Code content &lt; &lt;/h1&gt;");
94+
$I->seeInSource("&lt;h2&gt;Code content &gt; ' &lt;/h2&gt;");
95+
}
96+
}

tests/console/HelpCept.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$I->wantToTest('getting help from command line');
99

1010
$output=<<<OUT
11-
Phosphorum 3.3.1
11+
Phosphorum 3.3.2
1212
Usage: php forum [command <arguments>] [--help | -H] [--version | -V] [--list]
1313
OUT;
1414

tests/console/VersionCept.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$sha = substr(trim($I->runShellCommand('git rev-parse HEAD')), 0, 7);
1212

1313
$output=<<<OUT
14-
Phosphorum version 3.3.1, git commit $sha
14+
Phosphorum version 3.3.2, git commit $sha
1515
OUT;
1616

1717
$I->runShellCommand('php forum -V');

0 commit comments

Comments
 (0)