This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251749 - Wrong results shown for exception test
Summary: Wrong results shown for exception test
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-09 21:35 UTC by waldermort
Modified: 2015-04-24 02:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description waldermort 2015-04-09 21:35:11 UTC
When running a PHPUnit test for a thrown exception, the "Test Results" window does not show the failed tests. It also shows an incorrect count of tests run.

To reproduce, add these two methods to any PHPUnit test class:

    public function testWorksAndWindowHasCorrectOutput ()
    {
        $this->setExpectedException('\Exception');
        throw new \Exception('foo');
    }

    public function testFailsButWindowShowsAllPassed ()
    {
        $this->setExpectedException('\Exception');
    }

The "Output" window displays the correct number of tests, (2) in this case. One has passed the other has failed.

The "Test Results" window display a 100% pass with (1) test.
Comment 1 Tomas Mysik 2015-04-23 08:38:56 UTC
In my case, the Test Results window says: No tests executed. Will investigate it.

Thanks.

Product Version: NetBeans IDE Dev (Build 20150423-63b24b1c43e0)
Java: 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11
Runtime: Java(TM) SE Runtime Environment 1.7.0_80-b15
System: Linux version 3.16.0-34-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 2 Tomas Mysik 2015-04-23 09:01:11 UTC
Should be fixed now, please verify. Thanks for catching that.

http://hg.netbeans.org/web-main/rev/1ff6dd944d28
Comment 3 Quality Engineering 2015-04-24 02:45:25 UTC
Integrated into 'main-silver', will be available in build *201504240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1ff6dd944d28
User: Tomas Mysik <tmysik@netbeans.org>
Log: #251749 - Wrong results shown for exception test