Fixture::beforeUnload()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CorpSoft\Fixture;
4
5
/**
6
 * Fixture represents a fixed state of a test environment.
7
 */
8
class Fixture
9
{
10
    /**
11
     * @var array the fixtures that this fixture depends on. This must be a list of the dependent
12
     * fixture class names.
13
     */
14
    public $depends = [];
15
16
    /**
17
     * Loads the fixture.
18
     * This method is called before performing every test method.
19
     * You should override this method with concrete implementation about how to set up the fixture.
20
     */
21
    public function load(): void
22
    {
23
    }
24
25
    /**
26
     * This method is called BEFORE any fixture data is loaded for the current test.
27
     */
28
    public function beforeLoad(): void
29
    {
30
    }
31
32
    /**
33
     * This method is called AFTER all fixture data have been loaded for the current test.
34
     */
35
    public function afterLoad(): void
36
    {
37
    }
38
39
    /**
40
     * Unloads the fixture.
41
     * This method is called after every test method finishes.
42
     * You may override this method to perform necessary cleanup work for the fixture.
43
     */
44
    public function unload(): void
45
    {
46
    }
47
48
    /**
49
     * This method is called BEFORE any fixture data is unloaded for the current test.
50
     */
51
    public function beforeUnload(): void
52
    {
53
    }
54
55
    /**
56
     * This method is called AFTER all fixture data have been unloaded for the current test.
57
     */
58
    public function afterUnload(): void
59
    {
60
    }
61
}
62