degraciamathieu / nero
Crash your application
v1.0
2018-05-14 20:12 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- mockery/mockery: ^0.9.9
- phpunit/phpunit: 5.7.*
This package is auto-updated.
Last update: 2024-12-06 09:03:50 UTC
README
DeGraciaMathieu/Nero
This package allows you to simulate a fatal error in your PHP application
Installation
Run in console below command to download package to your project:
composer require degraciamathieu/nero
How use
There are two possibilities : Breaker::syntaxError()
and Breaker::classNotFound()
.
You can pass to these methods several criteria: a file, a specific line and a parameter.
require 'vendor\autoload.php'; use \DeGraciaMathieu\Nero\Breaker; Breaker::syntaxError($file = null, $line = null, $parameter = null);
By default the method will automatically complete all these criteria.
Basic usage
require 'vendor\autoload.php'; use \DeGraciaMathieu\Nero\Breaker; Breaker::syntaxError();
require 'vendor\autoload.php'; use \DeGraciaMathieu\Nero\Breaker; Breaker::classNotFound();
Usage with parameters
require 'vendor\autoload.php'; use \DeGraciaMathieu\Nero\Breaker; Breaker::syntaxError('Website\routes\web.php', 120, ';');
require 'vendor\autoload.php'; use \DeGraciaMathieu\Nero\Breaker; Breaker::classNotFound('Website\routes\web.php', 30, 'MySpecificClass');