@@ -35,46 +35,4 @@ public function pipelineRunner(): PipelineRunnerInterface
3535 {
3636 return new PipelineRunner ();
3737 }
38-
39- protected function assertNodeIsInstanceOf (string $ expected , DefaultBuilder $ builder , string $ message = '' ): void
40- {
41- $ printer = new PrettyPrinter \Standard ();
42-
43- try {
44- $ filename = sha1 (random_bytes (128 )) .'.php ' ;
45- $ file = new vfsStreamFile ($ filename );
46- $ file ->setContent ($ printer ->prettyPrintFile ([
47- new Node \Stmt \Return_ ($ builder ->getNode ()),
48- ]));
49- $ this ->fs ->addChild ($ file );
50-
51- $ actual = include vfsStream::url ('root/ ' .$ filename );
52- } catch (\ParseError $ exception ) {
53- echo $ printer ->prettyPrintFile ([$ builder ->getNode ()]);
54- $ this ->fail ($ exception ->getMessage ());
55- }
56-
57- $ this ->assertInstanceOf ($ expected , $ actual , $ message );
58- }
59-
60- protected function assertNodeIsNotInstanceOf (string $ expected , DefaultBuilder $ builder , string $ message = '' ): void
61- {
62- $ printer = new PrettyPrinter \Standard ();
63-
64- try {
65- $ filename = sha1 (random_bytes (128 )) .'.php ' ;
66- $ file = new vfsStreamFile ($ filename );
67- $ file ->setContent ($ printer ->prettyPrintFile ([
68- new Node \Stmt \Return_ ($ builder ->getNode ()),
69- ]));
70- $ this ->fs ->addChild ($ file );
71-
72- $ actual = include vfsStream::url ('root/ ' .$ filename );
73- } catch (\ParseError $ exception ) {
74- echo $ printer ->prettyPrintFile ([$ builder ->getNode ()]);
75- $ this ->fail ($ exception ->getMessage ());
76- }
77-
78- $ this ->assertNotInstanceOf ($ expected , $ actual , $ message );
79- }
8038}
0 commit comments