-
Notifications
You must be signed in to change notification settings - Fork 5
T dannhauer additional tests for horde/url #3
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
base: FRAMEWORK_6_0
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <?php | ||
| /** | ||
| * @author Torben Dannhauer / GPT-5 | ||
| * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
| * @category Horde | ||
| * @package Url | ||
| * @subpackage UnitTests | ||
| */ | ||
|
|
||
| namespace Horde\Url; | ||
| use \PHPUnit\Framework\TestCase; | ||
| use \Horde_Url; | ||
|
|
||
| class StringableParamTest extends TestCase | ||
| { | ||
| private function getStringableObject($value) | ||
| { | ||
| return new class($value) { | ||
| private $value; | ||
| public function __construct($value) { $this->value = $value; } | ||
| public function __toString() { return (string)$this->value; } | ||
| }; | ||
| } | ||
|
|
||
| public function testStringableObjectAsParamValue() | ||
| { | ||
| $this->markTestIncomplete('Generalized normalization for all stringable objects may be implemented later.'); | ||
| $url = new Horde_Url('test'); | ||
| $url->add('s', $this->getStringableObject('a&b')); | ||
| // Current implementation only normalizes Horde_Url instances; generic stringables are not cast explicitly. | ||
| // Keep test incomplete until generalized handling is agreed upon. | ||
| } | ||
|
Contributor
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. Do we want to make it truly universal? Then I guess we need to check for presence of
Contributor
Author
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. To be honest PHP is not my home run, so I do not feel experienced enough for the decisions there. @ralflang what do you think? |
||
| } | ||
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.
Method uses tabs for indentation which is inconsistent with PSR-12 coding standards that recommend 4 spaces.