-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHP-safe indentation replaced with Helpers::unindent() because requir…
…es too much memory Revert "implemented PHP-safe indentation" This reverts commit 5eae391.
- Loading branch information
Showing
10 changed files
with
39 additions
and
274 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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,29 @@ | ||
<?php | ||
|
||
/** | ||
* Test: Nette\PhpGenerator\Helpers::unindent() | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
use Nette\PhpGenerator\Helpers; | ||
use Tester\Assert; | ||
|
||
|
||
require __DIR__ . '/../bootstrap.php'; | ||
|
||
|
||
Assert::same('', Helpers::unindent('', 1)); | ||
Assert::same("\n", Helpers::unindent("\n", 1)); | ||
Assert::same('word', Helpers::unindent('word', 1)); | ||
Assert::same("\nword", Helpers::unindent("\nword", 1)); | ||
Assert::same("\nword\n", Helpers::unindent("\nword\n", 1)); | ||
Assert::same('word', Helpers::unindent("\tword", 1)); | ||
Assert::same("\tword", Helpers::unindent("\t\tword", 1)); | ||
Assert::same('word', Helpers::unindent("\t\tword", 2)); | ||
Assert::same("\nword", Helpers::unindent("\n\tword", 1)); | ||
Assert::same("word\t", Helpers::unindent("word\t", 1)); | ||
Assert::same("word\tword", Helpers::unindent("word\tword", 1)); | ||
Assert::same("word\t\nword", Helpers::unindent("word\t\nword", 1)); | ||
Assert::same('word', Helpers::unindent(' word', 1)); | ||
Assert::same(' word', Helpers::unindent(' word', 1)); |
This file was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -78,6 +78,7 @@ a | |
c | ||
DOC | ||
; | ||
// inline HTML is not supported | ||
?> | ||
a | ||
b | ||
|