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

Active Directory Authenticated Proxy Server with Squid or CNTLM -

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

java - @PluginTarget(Node.class) not registering as neo4j plugin -