Pantheon\Terminus\UnitTests\Commands\PaymentMethod\ListCommandTest::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->payment_methods = $this->getMockBuilder(PaymentMethods::class)->disableOriginalConstructor()->getMock();
        $this->session->expects($this->once())->method('getUser')->with()->willReturn($this->user);
        $this->user->expects($this->once())->method('getPaymentMethods')->with()->willReturn($this->payment_methods);
        $this->payment_methods->expects($this->once())->method('fetch')->with()->willReturn($this->payment_methods);
        $this->command = new ListCommand($this->getConfig());
        $this->command->setSession($this->session);
        $this->command->setLogger($this->logger);
    }