@@ -41,8 +41,6 @@ public function setUp(): void
41
41
$ data = json_decode (file_get_contents (TEST_STATICS . '/drafter/json/index.json ' ));
42
42
$ this ->class = new HtmlGenerator ();
43
43
$ this ->reflection = new ReflectionClass ('PHPDraft\Parse\HtmlGenerator ' );
44
-
45
- $ this ->mock_function ('microtime ' , function () { return 'sometime ' ; });
46
44
$ this ->class ->init ($ data );
47
45
48
46
$ this ->class ->sorting = -1 ;
@@ -53,7 +51,6 @@ public function setUp(): void
53
51
*/
54
52
public function tearDown (): void
55
53
{
56
- $ this ->unmock_function ('microtime ' );
57
54
uopz_undefine ('ID_STATIC ' );
58
55
unset($ this ->class );
59
56
unset($ this ->reflection );
@@ -74,38 +71,17 @@ public function testSetupCorrectly(): void
74
71
*/
75
72
public function testGetHTML (): void
76
73
{
77
- $ old = THIRD_PARTY_ALLOWED ;
78
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , true );
79
74
$ this ->expectOutputString (file_get_contents (TEST_STATICS . '/drafter/html/basic.html ' ));
80
75
$ this ->class ->get_html ();
81
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , $ old );
82
- }
83
-
84
- /**
85
- * Tests if the constructor sets the property correctly
86
- */
87
- public function testGetHTMLInheritance (): void
88
- {
89
- $ this ->markTestSkipped ('Not testing. ' );
90
- $ old = THIRD_PARTY_ALLOWED ;
91
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , true );
92
- $ class = new HtmlGenerator ();
93
- $ class ->init (json_decode (file_get_contents (TEST_STATICS . '/drafter/json/inheritance.json ' )));
94
- $ this ->expectOutputString (file_get_contents (TEST_STATICS . '/drafter/html/inheritance.html ' ));
95
- $ class ->get_html ();
96
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , $ old );
97
76
}
98
77
99
78
/**
100
79
* Tests if the constructor sets the property correctly
101
80
*/
102
81
public function testGetHTMLMaterial (): void
103
82
{
104
- $ old = THIRD_PARTY_ALLOWED ;
105
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , true );
106
83
$ this ->expectOutputString (file_get_contents (TEST_STATICS . '/drafter/html/material.html ' ));
107
84
$ this ->class ->get_html ('material ' );
108
- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , $ old );
109
85
}
110
86
111
87
/**
0 commit comments