Hypernode\Magento\Command\Hypernode\Varnish\VarnishFlushCommandTest::testExecute PHP Method

testExecute() public method

public testExecute ( )
    public function testExecute()
    {
        $command = $this->getCommand();
        $commandTester = new CommandTester($command);
        $commandTester->execute([]);
        $result = $commandTester->getDisplay();
        if (!$this->isTurpentineEnabled()) {
            $this->assertRegExp('/^(.*?(Turpentine is not enabled or installed.)[^$]*)$/m', $result);
        } else {
            $command = $this->getCommand();
            $commandTester = new CommandTester($command);
            $commandTester->execute([]);
            $result = $commandTester->getDisplay();
            $this->assertRegExp('/^(.*?(Flushed cached varnish URL\'s)[^$]*)$/m', $result);
        }
    }