Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4478

Unit tests for PHP Code analysis fail on Windows

    XMLWordPrintableJSON

Details

    Description

      Unit tests for PHP Code analysis module fail on Windows.

      Run ant -f php/php.code.analysis test on Windows and it results in build failure.

      Log from failure:

          [junit] ?er 22, 2020 7:44:24 ODP. org.netbeans.modules.php.analysis.parsers.PHPStanReportParser getCurrentFile
          [junit] WARNING: Cannot get the current file: file name /home/junichi11/NetBeansProjects/PHPStan/app/Test1.php, root directory C:\D\netbeans\php\php.code.analysis\build\test\unit\data\phpstan\PHPStanSupport\netbeans3022
          [junit] ?er 22, 2020 7:44:24 ODP. org.netbeans.modules.php.analysis.parsers.PHPStanReportParser getCurrentFile
          [junit] WARNING: Cannot get the current file: file name /home/junichi11/NetBeansProjects/PHPStan/app/Test2.php, root directory C:\D\netbeans\php\php.code.analysis\build\test\unit\data\phpstan\PHPStanSupport\netbeans3022
          [junit] ------------- ---------------- ---------------
          [junit] Testcase: testParseNetBeans3022WithoutWorkDir(org.netbeans.modules.php.analysis.parsers.PHPStanReportParserTest):   FAILED
          [junit] expected:<3> but was:<0>
          [junit] junit.framework.AssertionFailedError: expected:<3> but was:<0>
          [junit]     at org.netbeans.modules.php.analysis.parsers.PHPStanReportParserTest.testParseNetBeans3022WithoutWorkDir(PHPStanReportParserTest.java:93)
          [junit]     at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:77)
          [junit]     at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:460)
          [junit]     at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:386)
          [junit]     at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Issue Links

          Activity

            People

              Kacer Tomáš Procházka
              Kacer Tomáš Procházka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m