-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
add getters to private properties, re: #148 #150
base: 1.x
Are you sure you want to change the base?
Conversation
Can you accept this PR, or give me some guidance on how to improve it? Thx. |
public function setScreenshotDir(?string $screenshotDir): void | ||
{ | ||
$this->screenshotDir = $screenshotDir; | ||
} | ||
|
||
public function setConsoleLogDir(?string $consoleLogDir): void | ||
{ | ||
$this->consoleLogDir = $consoleLogDir; | ||
} |
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.
I don't think we want to mutate these ones, WDYT @kbond?
public function getScreenshotDir(): ?string | ||
{ | ||
return $this->screenshotDir; | ||
} | ||
|
||
public function getConsoleLogDir(): ?string | ||
{ | ||
return $this->consoleLogDir; | ||
} |
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.
maybe i'ts time to bump php 8.1, and change these two properties to public readonly
?
unfortunately, we can't do this for savedScreenshots
/ savedConsoleLogs
... I really hope https://wiki.php.net/rfc/asymmetric-visibility-v2 will land in PHP some day 🤞
Co-authored-by: Nicolas PHILIPPE <[email protected]>
@tacman, you can't use the I think it would be better to update HasBrowser::pantherBrowser() to accept these as options (I don't think the following works right now): $this->pantherBrowser(['screenshot_dir' => 'some/dir']); I'm really trying to keep the public api of browsers confined to just actions/assertions if possible. |
so the user can do something with the saved screenshots.