PHP code example of worksome / pest-plugin-silence
1. Go to this page and download the library: Download worksome/pest-plugin-silence library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
worksome / pest-plugin-silence example snippets
use Worksome\PestPluginSilence\Silence;
it('just works', function () {
Silence::preventOutput();
echo "Uh-oh!"
expect(true)->toBeTrue();
});
class TestCase extends BaseTestCase
{
public function setUp(): void
{
parent::setUp();
Silence::preventOutput();
}
}
xml
<phpunit>
<php>
<env name="PREVENT_OUTPUT" value="true"/>
</php>
</phpunit>