<?php

use Box\TestScribe\_fixture\_input\TestMethodsProvider;
use Box\TestScribe\_fixture\Directory;
use Box\TestScribe\_fixture\TestCreator;
include_once __DIR__ . '/../bootstrapForTest.php';
// Update the expected generated test files
$expectedTestsDir = Directory::getExpectedTestsDir();
$methodsDataArray = TestMethodsProvider::getTestMethods();
foreach ($methodsDataArray as $testMethodData) {
    list($className, $methodName, $answerFileName) = $testMethodData;
    TestCreator::createTest($className, $methodName, $expectedTestsDir, $answerFileName);
}
 /**
  * Functional test of test generator.
  *
  * @param string $className
  * @param string $methodName
  * @param string $answerFileName
  *
  * @return void
  */
 private function verifyCorrectTestFileIsGenerated($className, $methodName, $answerFileName)
 {
     $tempDir = $this->tempDir;
     $outputFilePath = "{$tempDir}/{$className}" . self::GENERATED_TEST_FILE_SUFFIX;
     TestCreator::createTest($className, $methodName, $tempDir, $answerFileName);
     $expectedFilePath = Directory::getExpectedTestsDir() . '/_input/' . $className . self::GENERATED_TEST_FILE_SUFFIX;
     $this->assertFileEquals($expectedFilePath, $outputFilePath);
 }