public function testBackupIsAStack()
{
$this->mock->registerHandler('foo', 'bar', 'callback2');
$handlers1 = $this->mock->getAllHandlers();
$this->mock->backup();
$this->mock->registerHandler('all', 'all', 'callback4', 100);
$handlers2 = $this->mock->getAllHandlers();
$this->mock->backup();
$this->mock->restore();
$this->assertEquals($handlers2, $this->mock->getAllHandlers());
$this->mock->restore();
$this->assertEquals($handlers1, $this->mock->getAllHandlers());
}