Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Foundation\Testing;
4
 
5
use Exception;
6
 
7
trait WithoutEvents
8
{
9
    /**
10
     * Prevent all event handles from being executed.
11
     *
12
     * @throws \Exception
13
     */
14
    public function disableEventsForAllTests()
15
    {
16
        if (method_exists($this, 'withoutEvents')) {
17
            $this->withoutEvents();
18
        } else {
19
            throw new Exception('Unable to disable events. ApplicationTrait not used.');
20
        }
21
    }
22
}