Pantheon\Terminus\UnitTests\Commands\Site\CreateCommandTest::setUp PHP Method

setUp() protected method

protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        $this->session = $this->getMockBuilder(Session::class)->disableOriginalConstructor()->getMock();
        $this->user = $this->getMockBuilder(User::class)->disableOriginalConstructor()->getMock();
        $this->upstreams = $this->getMockBuilder(Upstreams::class)->disableOriginalConstructor()->getMock();
        $this->upstream = $this->getMockBuilder(Upstream::class)->disableOriginalConstructor()->getMock();
        $this->upstream->id = 'upstream_id';
        $this->session->expects($this->once())->method('getUser')->with()->willReturn($this->user);
        $this->user->expects($this->once())->method('getUpstreams')->with()->willReturn($this->upstreams);
        $this->upstreams->expects($this->once())->method('get')->willReturn($this->upstream);
        $this->command = new CreateCommand($this->getConfig());
        $this->command->setSites($this->sites);
        $this->command->setLogger($this->logger);
        $this->command->setSession($this->session);
    }
CreateCommandTest