/** * @covers Rhumsaa\Uuid\Console\Util\ErrorHandler::register */ public function testRegister() { $expected = array('Rhumsaa\\Uuid\\Console\\Util\\ErrorHandler', 'handle'); $originalHandler = set_error_handler(function () { }); ErrorHandler::register(); $testHandler = set_error_handler(function () { }); // Set handler back to original set_error_handler($originalHandler); $this->assertEquals($expected, $testHandler); }
/** * Constructor */ public function __construct() { Util\ErrorHandler::register(); parent::__construct('uuid', Uuid::VERSION); }