Gush\Tests\Command\Util\MetaHeaderCommandTest::testExcludedFilesAreNotUpdated PHP Method

testExcludedFilesAreNotUpdated() public method

    public function testExcludedFilesAreNotUpdated()
    {
        $command = new MetaHeaderCommand();
        $tester = $this->getCommandTester($command, null, array_merge(CommandTestCase::$localConfig, ['meta-header' => self::META_HEADER, 'meta-exclude' => ['*.js']]), function (HelperSet $helperSet) {
            $helperSet->set($this->getMetaHelper());
        });
        file_put_contents($this->srcDir . '/metatest.twig', OutputFixtures::HEADER_LICENSE_TWIG);
        $tester->execute([], ['interactive' => false]);
        $display = $tester->getDisplay();
        $this->assertCommandOutputMatches(['Update css file(s)', 'The following header will be set on 1 files:', '[IGNORED]: ' . $this->srcDir . '/metatest.twig', '[UPDATED]: ' . $this->srcDir . '/metatest.php', '[UPDATED]: ' . $this->srcDir . '/metatest.css', 'The following header will be set on 1 files:', 'css files were updated.', 'twig files were updated.'], $display);
        $this->assertNotContains('[UPDATED]: ' . $this->srcDir . '/metatest.js', $display);
        $this->assertEquals(OutputFixtures::HEADER_LICENSE_TWIG, file_get_contents($this->srcDir . '/metatest.twig'));
        $this->assertEquals(OutputFixtures::HEADER_LICENSE_PHP, file_get_contents($this->srcDir . '/metatest.php'));
        $this->assertEquals(OutputFixtures::HEADER_LICENSE_CSS, file_get_contents($this->srcDir . '/metatest.css'));
        $this->assertEquals(file_get_contents(__DIR__ . '/../../Fixtures/meta/metatest.js'), file_get_contents($this->srcDir . '/metatest.js'));
    }