@@ -41,8 +41,6 @@ public function setUp(): void
4141 $ data = json_decode (file_get_contents (TEST_STATICS . '/drafter/json/index.json ' ));
4242 $ this ->class = new HtmlGenerator ();
4343 $ this ->reflection = new ReflectionClass ('PHPDraft\Parse\HtmlGenerator ' );
44-
45- $ this ->mock_function ('microtime ' , function () { return 'sometime ' ; });
4644 $ this ->class ->init ($ data );
4745
4846 $ this ->class ->sorting = -1 ;
@@ -53,7 +51,6 @@ public function setUp(): void
5351 */
5452 public function tearDown (): void
5553 {
56- $ this ->unmock_function ('microtime ' );
5754 uopz_undefine ('ID_STATIC ' );
5855 unset($ this ->class );
5956 unset($ this ->reflection );
@@ -74,38 +71,17 @@ public function testSetupCorrectly(): void
7471 */
7572 public function testGetHTML (): void
7673 {
77- $ old = THIRD_PARTY_ALLOWED ;
78- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , true );
7974 $ this ->expectOutputString (file_get_contents (TEST_STATICS . '/drafter/html/basic.html ' ));
8075 $ 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 );
9776 }
9877
9978 /**
10079 * Tests if the constructor sets the property correctly
10180 */
10281 public function testGetHTMLMaterial (): void
10382 {
104- $ old = THIRD_PARTY_ALLOWED ;
105- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , true );
10683 $ this ->expectOutputString (file_get_contents (TEST_STATICS . '/drafter/html/material.html ' ));
10784 $ this ->class ->get_html ('material ' );
108- $ this ->constant_redefine ('THIRD_PARTY_ALLOWED ' , $ old );
10985 }
11086
11187 /**
0 commit comments