StackFormation\Tests\BlueprintActionTest::statusVariable PHP 메소드

statusVariable() 공개 메소드

public statusVariable ( )
    public function statusVariable()
    {
        $testfile = tempnam(sys_get_temp_dir(), __FUNCTION__);
        $blueprintMock = $this->getMock('\\StackFormation\\Blueprint', [], [], '', false);
        $blueprintMock->method('getBlueprintReference')->willReturn('FOO');
        $blueprintMock->method('getStackName')->willReturn('FooStackName');
        $blueprintMock->method('getBasePath')->willReturn(sys_get_temp_dir());
        $blueprintMock->method('getAfterScript')->willReturn('echo -n "$STATUS" > ' . $testfile);
        $blueprintAction = new \StackFormation\BlueprintAction($blueprintMock, $this->profileManagerMock);
        $blueprintAction->executeAfterScript('FOOSTATUS');
        $this->assertStringEqualsFile($testfile, 'FOOSTATUS');
        unlink($testfile);
    }