testNonLegacyBar example



    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
        trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();

?> --EXPECTF-- Unsilenced deprecation notices (3) 2x: unsilenced foo deprecation 2x in FooTestCase::testLegacyFoo 1x: unsilenced bar deprecation 1x in FooTestCase::testNonLegacyBar Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar


    public function testNonLegacyBar()
    {
        @trigger_error('ignored bar deprecation', E_USER_DEPRECATED);
        @trigger_error('not ignored bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();
?> --EXPECTF-- Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: not ignored bar deprecation 1x in FooTestCase::testNonLegacyBar
trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
    }

    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();
print "Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function."
?> --EXPECT-- Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function. Legacy deprecation notices (1)
trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
    }

    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();
print "Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function."
?> --EXPECT-- Cannot test baselineFile contents because it is generated in a shutdown function registered by another shutdown function. Legacy deprecation notices (1)


    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
        trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();

?> --EXPECTF-- Unsilenced deprecation notices (3) 2x: unsilenced foo deprecation 2x in FooTestCase::testLegacyFoo 1x: unsilenced bar deprecation 1x in FooTestCase::testNonLegacyBar Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar


    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', \E_USER_DEPRECATED);
        trigger_error('unsilenced bar deprecation', \E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();


    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
        trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();

register_shutdown_function(function D) {
    @trigger_error('root deprecation during shutdown', E_USER_DEPRECATED);
});

?> --EXPECTF-- Unsilenced deprecation notices (3) 2x: unsilenced foo deprecation 2x in FooTestCase::testLegacyFoo 1x: unsilenced bar deprecation 1x in FooTestCase::testNonLegacyBar Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar Shutdown-time deprecations: Other deprecation notices (1) 1x: root deprecation during shutdown


    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
        trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();

register_shutdown_function(function D) {
    exit('I get precedence over any exit statements inside the deprecation error handler.');
});

?> --EXPECTF-- Unsilenced deprecation notices (3) 2x: unsilenced foo deprecation 2x in FooTestCase::testLegacyFoo 1x: unsilenced bar deprecation 1x in FooTestCase::testNonLegacyBar Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar I get precedence over any exit statements inside the deprecation error handler.
        @trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
    }

    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();
?> --EXPECTF-- Legacy deprecation notices (2) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar
trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
    }

    public function testNonLegacyBar()
    {
        @trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
    }
}

$foo = new FooTestCase();
$foo->testLegacyFoo();
$foo->testNonLegacyBar();
?> --EXPECTF-- Legacy deprecation notices (1) Other deprecation notices (2) 1x: root deprecation 1x: silenced bar deprecation 1x in FooTestCase::testNonLegacyBar
Home | Imprint | This part of the site doesn't use cookies.