PHPUnit Unix remote + Windows local paths

I have PHPUnit running successfully as a remote mounted configuration, but I'm wondering whether there's a way to have PhpStorm link the files in the results window and also a question about the accuracy of the report.

In the below picture from the Jetbrains blog post each of the files are linked, but in my situation since my local files are in c:\cvs\ and the remote files are in a Unix path such as /home/project/ what happens is the files are not linked, even though I've done some mapping.  Is this a limitation or do I have to improve my mapping?


http://blogs.jetbrains.com/webide/wp-content/uploads/2009/12/run_console.png

I'm also wondering about the stats returned.  It seems to only show the number of tests run, is there a way to show the number of assertions passed/failed? (phpunit command line shows this)

12 comments
Comment actions Permalink

Hi there,

In the below picture from the Jetbrains blog post each of the files are linked, but in my situation since my local files are in c:\cvs\ and the remote files are in a Unix path such as /home/project/ what happens is the files are not linked, even though I've done some mapping.  Is this a limitation or do I have to improve my mapping?

Please provide your configuration details as well as results you are getting (what error path/link you see and what it should be) as it is not possible to see if this is a PhpStorm issue or misconfiguration on your side based on the information you have provided so far.

I'm also wondering about the stats returned.  It seems to only show the number of tests run, is there a way to show the number of assertions passed/failed? (phpunit command line shows this)

No, currently PhpStorm does not show this information. Please fill a Feature request on Issue Tracker: http://youtrack.jetbrains.net/issues/WI

0
Comment actions Permalink

Here is the output:



PHPUnit_Framework_ExpectationFailedException : Failed asserting that <string:The quick br...> is identical to <string:The quick b...>.
#0 /usr/local/share/pear/PHPUnit/Framework/Assert.php(2087): fail()
#1 /usr/local/share/pear/PHPUnit/Framework/Assert.php(963): assertThat()
#2 /.amd_mnt/howard/projects/neolib/tests/htmltag_truncateTest.php(34): assertSame()
#3 /usr/local/share/pear/PHPUnit/Framework/TestCase.php(738): invokeArgs()
#4 /usr/local/share/pear/PHPUnit/Framework/TestCase.php(628): runTest()
#5 /usr/local/share/pear/PHPUnit/Framework/TestResult.php(666): runBare()
#6 /usr/local/share/pear/PHPUnit/Framework/TestCase.php(576): run()
#7 /usr/local/share/pear/PHPUnit/Framework/TestSuite.php(757): run()
#8 /usr/local/share/pear/PHPUnit/Framework/TestSuite.php(733): runTest()
#9 /usr/local/share/pear/PHPUnit/TextUI/TestRunner.php(305): run()
#10 /.amd_mnt/howard/projects/neolib/tests/_intellij_phpunit_launcher.php(444): doRun()
#11 /.amd_mnt/howard/projects/neolib/tests/_intellij_phpunit_launcher.php(643): runTest()
#12 /.amd_mnt/howard/projects/neolib/tests/_intellij_phpunit_launcher.php(746): main()


Here are some screenshots:

phpunit_results.png

deployment_mapping.png

deployment.png

run_debug_page.png

(Using EAP 106.550)
0
Comment actions Permalink

The last screenshot (Run Configuration) -- have you tried to setup mappings on the "Remote" tab -> "Server path mappings..." button ?

0
Comment actions Permalink

I did not have anything mapped there (no Debug Server set either) so I added the below as a test and I still have the same problem.

remote_mapping.png

0
Comment actions Permalink

Exactly the same? I mean, taking the output you have provided, I would expect lines #2, 10, 11, 12 to have local path references...

This may not be relevant to this case (no debugging here so I'm unsure about this), but can you try & setup debug server (same "Remote" tab -- basically, it's just another mapping for debugging purposes -- at least that part) and try again.

If still no changes .. then I can only recommend submit a new ticket on Issue Tracker so it will be looked into and resolved: http://youtrack.jetbrains.net/issues/WI

Also -- please try the latest EAP build -- PS-107.21

EDIT:
Possibly you are facing this bug (or it shares the same roots): WI-4559 or WI-5559

0
Comment actions Permalink

In order to have resolution of file paths you should specify mapping for your local project folder -> Unix real project path. In your case it should be something like c:\cvs\ (local) -> /home/project/ (deployment) + web path. If that does not help, could you please enable logging for php and attach your log file to this thread. To do that follow the steps below:

  • open <PhpStorm home>/log.xml with text editor
  • scroll to the bottom, add the following part before <root> tag:
<category name="com.jetbrains.php">
    <priority value="DEBUG"/>
</category>


  • restart PhpStorm
  • reproduce the problem
  • attach idea.log file found at ~/.WebIDE10/system/logs on Windows and Linux and at ~/Library/Caches/WebIDE10/system/logs on OS X


Thank you.

0
Comment actions Permalink

The mappings don't help, and to answer about lines #2, 10, 11, 12 they do not change with mappings.  Attached is the idea.log

I can also confirm that the mappings do not work in EAP 107.21 either.



Attachment(s):
idea.log.zip
0
Comment actions Permalink

Andriy,

This may not be relevant to this case (no debugging here so I'm unsure about this), but can you try & setup debug server (same "Remote" tab -- basically, it's just another mapping for debugging purposes -- at least that part) and try again.

FYI: This is not relevant. 'Debug server' mappings used for debugging only. (yeah, it is quite complicated and should be reworked)

0
Comment actions Permalink

Do I need to provide any more information to help figure this out?  Would love to use this as intended.

Thanks

0
Comment actions Permalink

Thank you very much, we figured out what the problem is. Hopefully, that will be sorted out with 2.1 release.

0
Comment actions Permalink

Great news, thanks and glad it worked out!

0
Comment actions Permalink

This appears to be fixed in 107.94.   Please ee attached screenshot.  Thanks very much!

Screenshot - Thu  May_19_2011 , 4_20_20 PM.png

0

Please sign in to leave a comment.