This repository was archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Unicode json_encode patch #23
Open
Limych
wants to merge
18
commits into
marcj:master
Choose a base branch
from
Limych:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6487206
Added Unicode json_encoding patch
Limych b0636eb
Added Unicode json_encoding patch
Limych a8b33f4
Added Unicode json_encoding patch
Limych 96f9811
Added Unicode json_encoding patch
Limych a3c766f
Added Unicode json_encoding patch
Limych d750f52
Added Unicode json_encoding patch
Limych 73cf012
Added Unicode json_encoding patch
Limych 96c5cd5
Added Unicode json_encoding patch
Limych dfe773d
Added Unicode json_encoding patch
Limych f9f52d9
Added Unicode json_encoding patch
Limych ad25c4f
Added Unicode json_encoding patch
Limych d23b81a
Added Unicode json_encoding patch
Limych 69f600d
Added Unicode json_encoding patch
Limych 3a43619
Added Unicode json_encoding patch
Limych cfba0f8
Added Unicode json_encoding patch
Limych 26d795c
Added Unicode json_encoding patch
Limych e368d31
Added Unicode json_encoding patch
Limych 1a781da
Added automatic data compression if it supported by PHP and client.
Limych File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ################# | ||
| ## Eclipse | ||
| ################# | ||
|
|
||
| *.pydevproject | ||
| .project | ||
| .metadata | ||
| bin/ | ||
| tmp/ | ||
| *.tmp | ||
| *.bak | ||
| *.swp | ||
| *~.nib | ||
| local.properties | ||
| .classpath | ||
| .settings/ | ||
| .loadpath | ||
|
|
||
| # External tool builders | ||
| .externalToolBuilders/ | ||
|
|
||
| # Locally stored "Eclipse launch configurations" | ||
| *.launch | ||
|
|
||
| # CDT-specific | ||
| .cproject | ||
|
|
||
| # PDT-specific | ||
| .buildpath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <?php | ||
|
|
||
| namespace Test\Synthetic; | ||
|
|
||
| use RestService\Server; | ||
| use Test\Controller\MyRoutes; | ||
|
|
||
| class UnicodeTest extends \PHPUnit_Framework_TestCase | ||
| { | ||
| /** | ||
| * @var Server | ||
| */ | ||
| private $restService; | ||
|
|
||
| public function setUp() | ||
| { | ||
| $this->restService = Server::create('/', new MyRoutes) | ||
| ->setClient('RestService\\InternalClient') | ||
| ->collectRoutes(); | ||
| } | ||
|
|
||
| private function assertEcho($test_string){ | ||
| $response = $this->restService->simulateCall("/echo?text=$test_string", 'post'); | ||
| $this->assertEquals("{ | ||
| \"status\": 200, | ||
| \"data\": \"$test_string\" | ||
| }", $response); | ||
| } | ||
|
|
||
| public function testUnicode() | ||
| { | ||
| $this->assertEcho('ru: В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!'); | ||
| $this->assertEcho('da: Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon'); | ||
| $this->assertEcho('de: Falsches Üben von Xylophonmusik quält jeden größeren Zwerg'); | ||
| $this->assertEcho('el: Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο'); | ||
| $this->assertEcho('es: El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro.'); | ||
| $this->assertEcho('fr: Le cœur déçu mais l\'âme plutôt naïve, Louÿs rêva de crapaüter en canoë au delà des îles, près du mälström où brûlent les novæ.'); | ||
| $this->assertEcho('ga: D\'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh'); | ||
| $this->assertEcho('hu: Árvíztűrő tükörfúrógép'); | ||
| $this->assertEcho('is: Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa'); | ||
| $this->assertEcho('jp1: いろはにほへとちりぬるを わかよたれそつねならむ うゐのおくやまけふこえて あさきゆめみしゑひもせす'); | ||
| $this->assertEcho('jp2: イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン'); | ||
| $this->assertEcho('iw: דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה'); | ||
| $this->assertEcho('pl: Pchnąć w tę łódź jeża lub ośm skrzyń fig'); | ||
| $this->assertEcho('th: ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ'); | ||
| $this->assertEcho('tr: Pijamalı hasta, yağız şoföre çabucak güvendi'); | ||
| } | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It misses end of file. |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 condition is the YODA condition.
Does this package use YODA condition?