-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DomCrawler] Exposed getter for baseHref #18143
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.