StackFormation\Tests\BlueprintActionTest::beforeScriptsThatFail PHP Метод

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

    public function beforeScriptsThatFail()
    {
        $this->setExpectedException('Exception', 'Error executing script');
        chdir(FIXTURE_ROOT . 'ProfileManager/fixture_before_scripts');
        $profileManager = new \StackFormation\Profile\Manager();
        $blueprintMock = $this->getMock('\\StackFormation\\Blueprint', [], [], '', false);
        $blueprintMock->method('getProfile')->willReturn('before_scripts_profile');
        $blueprintMock->method('getBlueprintReference')->willReturn('FOO');
        $blueprintMock->method('getBasePath')->willReturn(sys_get_temp_dir());
        $blueprintMock->method('getBeforeScript')->willReturn('exit 1');
        $blueprintAction = new \StackFormation\BlueprintAction($blueprintMock, $profileManager);
        $blueprintAction->executeBeforeScript();
    }