updateContent() публичный Метод

Note. We only support comments in the beginning of the file. If there is already a comment its replaced, if its missing its added.
public updateContent ( Gush\Meta\Meta $meta, string $header, string $fileContent ) : string
$meta Gush\Meta\Meta
$header string
$fileContent string
Результат string
Пример #1
0
    public function testUpdateContentPhpFileWithPreservedHeader()
    {
        $meta = $this->getMetaForPhp();
        $input = <<<'EOT'
<?php

/*!
 * This file is part of Your Package package.
 */

namespace Test;

class MetaTest
{
    private $test;

    public function __construct($test)
    {
        $this->test = $test;
    }
}

EOT;
        $expected = <<<'EOT'
<?php

/*!
 * This file is part of Your Package package.
 */

namespace Test;

class MetaTest
{
    private $test;

    public function __construct($test)
    {
        $this->test = $test;
    }
}

EOT;
        $this->assertEquals(ltrim($expected), $this->helper->updateContent($meta, self::$header, $input));
    }