Pantheon\Terminus\UnitTests\Commands\Org\ListCommandTest::testOrgListNotEmpty PHP Method

testOrgListNotEmpty() public method

Tests the multidev:list command when there are no multidev environments
public testOrgListNotEmpty ( )
    public function testOrgListNotEmpty()
    {
        $data = ['id' => 'org_id', 'name' => 'Organization Name'];
        $this->user->expects($this->once())->method('getOrganizations')->with()->willReturn([$this->organization, $this->organization]);
        $this->logger->expects($this->never())->method('log');
        $this->organization->expects($this->exactly(2))->method('serialize')->with()->willReturn($data);
        $out = $this->command->listOrgs();
        $this->assertInstanceOf('Consolidation\\OutputFormatters\\StructuredData\\RowsOfFields', $out);
        $this->assertEquals([$data, $data], $out->getArrayCopy());
    }