php - Can JS files be included in PHPUnit tests? -


I am working on making multilingual test cases. To obtain this, I have to use JS files to be used by the application. Is there any way to load those files in my PHPUnit script?

To fully ensure that what you are trying to do is assume that you Just want to take an existing JS file and execute its contents in Selenium. You can use the file_get_contents () function for this.

  $ script = file_get_contents ('/ path / to / your / script.js'); $ This- & gt; Execute (['script' = & gt; $ script, 'args' = & gt; []]);  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -