Pantheon\Terminus\UnitTests\Commands\AliasesCommandTest::setUp PHP Method

setUp() protected method

protected setUp ( )
    protected function setUp()
    {
        parent::setUp();
        $this->aliases = '//Aliases';
        $this->session = $this->getMockBuilder(Session::class)->disableOriginalConstructor()->getMock();
        $this->user = $this->getMockBuilder(User::class)->disableOriginalConstructor()->getMock();
        $this->session->expects($this->once())->method('getUser')->with()->willReturn($this->user);
        $this->user->expects($this->once())->method('getAliases')->with()->willReturn($this->aliases);
        $this->command = new AliasesCommand($this->getConfig());
        $this->command->setLogger($this->logger);
        $this->command->setSession($this->session);
    }
AliasesCommandTest