-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestHook.php
More file actions
37 lines (33 loc) · 831 Bytes
/
TestHook.php
File metadata and controls
37 lines (33 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php declare(strict_types=1);
namespace RichCongress\WebTestBundle;
use RichCongress\TestFramework\TestHook\AbstractTestHook;
use RichCongress\WebTestBundle\Doctrine\Driver\StaticDriver;
/**
* Class TestHook
*
* @package RichCongress\WebTestBundle
* @author Nicolas Guilloux <nguilloux@richcongress.com>
* @copyright 2014 - 2020 RichCongress (https://www.richcongress.com)
*/
class TestHook extends AbstractTestHook
{
/**
* @param string $test
*
* @return void
*/
public function executeBeforeTest(string $test): void
{
StaticDriver::beginTransaction();
}
/**
* @param string $test
* @param float $time
*
* @return void
*/
public function executeAfterTest(string $test, float $time): void
{
StaticDriver::rollBack();
}
}