I'm new to Selenium and am aiming to use it in my PHP projects. I've gotten through the initial learning bit and am now at the point where I need to test some JavaScript.
I've read a bit on how to do it but I stumble immediately on the easiest example possible. I want to, in my JS eval script, create a string and print it and verify its value.

Here's the code in my test case (yes, the test should fail as it looks now):
<font class="small">Code:</font><hr /><pre>
$jsSnippet = "{" +
"var fooString = 'bar'; "+
"fooString;" +
" } ";
$jsCheck = "foobar";
$this-&gt;assertEquals($jsCheck, $this-&gt;getEval($jsSnippet));
</pre><hr />

As mentioned it works fine for other tests, but for this one I get: 'Failed asserting that &lt;string:0&gt; is equal to &lt;string:foobar&gt;.

Thankful for advice!