-
Notifications
You must be signed in to change notification settings - Fork 118
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
Load custom templates now working (via #37) #114
Conversation
Fonsecas72 add render options
Should we start building & using tests in the classes? |
Can you add some documentation to the README.md file about this new template feature? |
We should |
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've added a few questions an comments and added mention of about updating the readme file.
$className = __NAMESPACE__.'\\'.$renderer.'Renderer'; | ||
} else { | ||
$className = $renderer; | ||
foreach ($rendererList as $r) { |
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.
We should probably have a better variable name than r in this loop.
foreach ($rendererList as $r) { | |
foreach ($rendererList as $renderer) { |
@@ -25,22 +25,22 @@ class BaseRenderer | |||
* @param string : list of the renderer | |||
* @param string : base_path |
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.
This should probably change to reference render_option instead of base_path
@@ -176,14 +176,14 @@ class BehatHTMLFormatter implements Formatter | |||
* @param $name | |||
* @param $base_path | |||
*/ | |||
public function __construct($name, $renderer, $filename, $print_args, $print_outp, $loop_break, $base_path) | |||
public function __construct($name, $renderer, $render_options, $filename, $print_args, $print_outp, $loop_break, $base_path) |
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.
By putting $render_options as the 3rd parameter does that make this a breaking change for anyone who has instantiated this class?
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 guess after all the time there will be some breaking changes in a lot of diffrent code bases. But we can move that.
I will reimplement this feature in the next time with a fresh and clean PR |
This is the merged and fixed pull request #37. (#32)
To load a custom twig template you can define the path and the file via your behat configuration: