@@ -45,36 +45,10 @@ public function testExport()
4545 $ testcase_class = 't_ ' . $ testcase_id ;
4646 $ testcase_object = new $ testcase_class ;
4747
48- $ testcase_expect = '' ;
49- $ testcase_format = $ testcase_object ->getFormat ();
50- $ testcase_example = $ testcase_object ->getExample ();
51- $ testcase_example_define = $ testcase_object ->getExampleDefine ();
52- $ testcase_example_content = $ testcase_object ->getExampleContent ();
53- foreach ($ testcase_example_define as $ define ) {
54- $ line = $ testcase_format ;
55-
56- $ line = preg_replace ('/<name>/ ' , $ define ['name ' ], $ line );
57- $ line = preg_replace ('/<file>/ ' , $ testcase_example , $ line );
58- $ line = preg_replace ('/<line content>/ ' , rtrim ($ testcase_example_content [$ define ['line ' ] - 1 ], "\n" ), $ line );
59- $ line = preg_replace ('/<kind>/ ' , $ define ['kind ' ], $ line );
60- $ line = preg_replace ('/<line number>/ ' , $ define ['line ' ], $ line );
61- if (!empty ($ define ['scope ' ])) {
62- $ line = preg_replace ('/<scope>/ ' , $ define ['scope ' ], $ line );
63- } else {
64- $ line = preg_replace ('/<scope>/ ' , '' , $ line );
65- }
66- if (!empty ($ define ['access ' ])) {
67- $ line = preg_replace ('/<access>/ ' , 'access: ' . $ define ['access ' ], $ line );
68- } else {
69- $ line = preg_replace ('/<access>/ ' , '' , $ line );
70- }
71- $ line = rtrim ($ line , "\t" );
72- $ line .= "\n" ;
73-
74- $ testcase_expect .= $ line ;
75- }
48+ $ testcase_expect = $ testcase_object ->getExpectResult ();
7649
7750 ob_start ();
51+ $ testcase_example = $ testcase_object ->getExample ();
7852 $ testcase_options = $ testcase_object ->getOptions ();
7953 $ this ->object ->export ($ testcase_example , $ testcase_options );
8054 $ testcase_result = ob_get_contents ();
0 commit comments