/**
  * @param string $expectedFile
  * @param array  $schema
  * @param bool   $dump
  */
 protected function assertGeneration($expectedFile, $schema, $dump = false)
 {
     $class = PhpClass::create('Test\\Entity');
     $this->extension->generate($schema, $class);
     $strategy = new DefaultGeneratorStrategy();
     $classBody = $strategy->generate($class);
     if ($dump) {
         print_r("\n" . $classBody . "\n");
     }
     $expectedBody = file_get_contents(__DIR__ . '/../Fixtures/' . $expectedFile);
     $this->assertEquals(trim($expectedBody), $classBody);
 }
 /**
  * @param string $expectedFile
  * @param array  $schema
  * @param bool   $dump
  */
 protected function assertGeneration($expectedFile, $schema, $dump = false)
 {
     $class = PhpClass::create('Test\\Entity');
     $this->extension->generate($schema, $class);
     $strategy = new DefaultGeneratorStrategy();
     $classBody = $strategy->generate($class);
     if ($dump) {
         print_r("\n" . $classBody . "\n");
     }
     $expectedBody = file_get_contents(__DIR__ . '/../Fixtures/' . $expectedFile);
     /**
      * Support different line endings.
      */
     $expectedBody = str_replace(PHP_EOL, "\n", $expectedBody);
     $classBody = str_replace(PHP_EOL, "\n", $classBody);
     $expectedBody = trim($expectedBody);
     $classBody = trim($classBody);
     $this->assertEquals($expectedBody, $classBody);
 }