public static function build($input, $output)
    {
        /**
         * The directory that contains the input file.
         *
         * Used to include common files.
         *
         * @var string
         */
        $directory = dirname($input) . '/';

        /**
         * The name of the file that contains the context.
         *
         * @var string
         */
        $file = basename($input);

        /**
         * The name of the context.
         *
         * @var string
         */
        $name = substr($file, 0, -4);

        /**
         * The name of the class that defines this context.
         *
         * @var string
         */
        $class = 'Context' . $name;

        /**
         * The formatted name of this context.
         *
         * @var string
         */
        $formattedName = static::formatName($name);

        file_put_contents(
            $output . '/' . $class . '.php',
            static::generate(
                [
                    'name' => $formattedName,
                    'class' => $class,
                    'link' => static::$LINKS[$name],
                    'keywords' => static::readWords(
                        [
                            $directory . '_common.txt',
                            $directory . '_functions' . $file,
                            $directory . $file,
                        ]
                    ),
                ]
            )
        );
    }
public static function build($input, $output)
    {
        /**
         * The directory that contains the input file.
         *
         * Used to include common files.
         *
         * @var string
         */
        $directory = dirname($input) . '/';

        /**
         * The name of the file that contains the context.
         *
         * @var string
         */
        $file = basename($input);

        /**
         * The name of the context.
         *
         * @var string
         */
        $name = substr($file, 0, -4);

        /**
         * The name of the class that defines this context.
         *
         * @var string
         */
        $class = 'Context' . $name;

        /**
         * The formatted name of this context.
         *
         * @var string
         */
        $formattedName = static::formatName($name);

        file_put_contents(
            $output . '/' . $class . '.php',
            static::generate(
                [
                    'name' => $formattedName,
                    'class' => $class,
                    'link' => static::$LINKS[$name],
                    'keywords' => static::readWords(
                        [
                            $directory . '_common.txt',
                            $directory . '_functions' . $file,
                            $directory . $file,
                        ]
                    ),
                ]
            )
        );
    }
public static function build ( $ input , $ output ) { /**
         * The directory that contains the input file.
         *
         * Used to include common files.
         *
         * @var string
         */ $ directory = dirname ( $ input ) . '/' ; /**
         * The name of the file that contains the context.
         *
         * @var string
         */ $ file = basename ( $ input ) ; /**
         * The name of the context.
         *
         * @var string
         */ $ name = substr ( $ file , 0 , - 4 ) ; /**
         * The name of the class that defines this context.
         *
         * @var string
         */ $ class = 'Context' . $ name ; /**
         * The formatted name of this context.
         *
         * @var string
         */ $ formattedName = static :: formatName ( $ name ) ; file_put_contents ( $ output . '/' . $ class . '.php' , static :: generate ( [ 'name' => $ formattedName , 'class' => $ class , 'link' => static :: $ LINKS [ $ name ] , 'keywords' => static :: readWords ( [ $ directory . '_common.txt' , $ directory . '_functions' . $ file , $ directory . $ file , ] ) , ] ) ) ; }
Builds a test.

Reads the input file, generates the data and writes it back.

@param string $input  the input file
@param string $output the output directory
Builds a test .