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

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

public cwdVariable ( )
    public function cwdVariable()
    {
        $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('getBeforeScript')->willReturn('echo -n "$CWD" > ' . $testfile);
        $blueprintAction = new \StackFormation\BlueprintAction($blueprintMock, $this->profileManagerMock);
        $blueprintAction->executeBeforeScript();
        $this->assertStringEqualsFile($testfile, getcwd());
        unlink($testfile);
    }