Skip to content

Commit

Permalink
Removed unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Jan 12, 2024
1 parent 563ae0b commit 51822e7
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions tests/functional/Builder/BuilderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,4 @@ public function pipelineRunner(): PipelineRunnerInterface
{
return new PipelineRunner();
}

protected function assertNodeIsInstanceOf(string $expected, DefaultBuilder $builder, string $message = ''): void
{
$printer = new PrettyPrinter\Standard();

try {
$filename = sha1(random_bytes(128)) .'.php';
$file = new vfsStreamFile($filename);
$file->setContent($printer->prettyPrintFile([
new Node\Stmt\Return_($builder->getNode()),
]));
$this->fs->addChild($file);

$actual = include vfsStream::url('root/'.$filename);
} catch (\ParseError $exception) {
echo $printer->prettyPrintFile([$builder->getNode()]);
$this->fail($exception->getMessage());
}

$this->assertInstanceOf($expected, $actual, $message);
}

protected function assertNodeIsNotInstanceOf(string $expected, DefaultBuilder $builder, string $message = ''): void
{
$printer = new PrettyPrinter\Standard();

try {
$filename = sha1(random_bytes(128)) .'.php';
$file = new vfsStreamFile($filename);
$file->setContent($printer->prettyPrintFile([
new Node\Stmt\Return_($builder->getNode()),
]));
$this->fs->addChild($file);

$actual = include vfsStream::url('root/'.$filename);
} catch (\ParseError $exception) {
echo $printer->prettyPrintFile([$builder->getNode()]);
$this->fail($exception->getMessage());
}

$this->assertNotInstanceOf($expected, $actual, $message);
}
}

0 comments on commit 51822e7

Please sign in to comment.