[DomCrawler] Exposed getter for baseHref#18143
Conversation
|
@AAstakhov in other circumstances it would be weird to open a PR for some issue which already has a PR ... but you are right and we are in the Hack Day so you can open it. Maybe it gets closed without merging it ... but maybe the other one is closed. Let's wait and see. Thanks! |
| public function testGetBaseHref() | ||
| { | ||
| $crawler = new Crawler(null, null, 'http://symfony.com'); | ||
| $this->assertEquals('http://symfony.com', $crawler->getBaseHref()); |
There was a problem hiding this comment.
You could put the string 'http://symfony.com' into a single variable, so one of them can't possibly be typo'd.
|
@patrick-mcdougle, thank you for the comment, I've fixed CrawlerTest regarding to your suggestion. |
|
👍 Status: reviewed |
|
👍 |
|
@nicolas-grekas That's true in theory, but in practice, if you can |
|
Thank you @AAstakhov. |
This PR was merged into the 3.1-dev branch. Discussion ---------- [DomCrawler] Expose getter for uri | Q | A | ------------- | --- | Branch | | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Same as #18143 Commits ------- baebdb4 [DomCrawler] Exposed getter for uri
I know that PR for this issue already created, but it is Hack Day, so I'm making my first contribution anyway.