error_reporting not working when running tests

When I run this test in PhpStorm 98.240 with Phpunit 3.5 it fails, but it passes on the command line. They both pass in PhpStorm 1.02 with Phpunit 3.4.

<?php

class ExampleTest extends PHPUnit_Framework_TestCase {

    public function testFailures()
    {
        error_reporting(0);

        $test = array();
        $test = $test[1];

        $this->assertTrue(TRUE);
    }

}


My php.ini is set to

error_reporting  =  E_ALL


Any ideas? I saw this, http://youtrack.jetbrains.net/issue/WI-3779?projectKey=WI&query=project%3A+WI+state%3A+Unresolved which looks very similar, but I was not sure if it was  exactly the same, as my code never seemed to get to that point when I tried to debug.

Is there a setting that I can change to make it pass and just show the notice, like it does in PhpStorm 1.02, or is it a bug?

1 comment

Hello, Steve.

Yes, these is a bug. I've opened a ticket, please follow our progress here http://youtrack.jetbrains.net/issue/WI-3858.

Thank you for reporting.

0

Please sign in to leave a comment.