/** * Compares the content of `expected/$fileName.php` as this and * `parsed/$fileName.php` once parsed. * * Makes the test fail at the first difference. * * @param string $fileName */ protected function parseAndCompare($fileName) { ob_start(); include __DIR__ . DIRECTORY_SEPARATOR . 'parsed' . DIRECTORY_SEPARATOR . static::$subFolder . DIRECTORY_SEPARATOR . $fileName . '.php'; $parsed = Pasap::parse(ob_get_clean()); $expected = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'expected' . DIRECTORY_SEPARATOR . static::$subFolder . DIRECTORY_SEPARATOR . $fileName . '.html'); $this->assertEquals(Pasap::minify($expected), $parsed); }
?> /> </group-scope> <group-scope <?php echo \Pasap\Pasap::scope(['two' => 2, 'three' => 3]); ?> > <list-scope <?php echo \Pasap\Pasap::scope(['one' => 1, 'two' => 22]); ?> /> </group-scope> <group-scope <?php echo \Pasap\Pasap::scope(['one' => 1]); ?> > <group-scope <?php echo \Pasap\Pasap::scope(['two' => 2]); ?> > <list-scope <?php echo \Pasap\Pasap::scope(['three' => 3]); ?> /> </group-scope> </group-scope> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <title>Document</title> </head> <body> <list-set <?php echo \Pasap\Pasap::data(['one' => 1, 'two' => 2, 'three' => 3]); ?> /> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <title>Document</title> </head> <body> <list-scope <?php echo \Pasap\Pasap::scope(['one' => 1, 'two' => 2, 'three' => 3]); ?> /> </body> </html>