Pantheon\Terminus\UnitTests\Commands\Org\Site\ListCommandTest::testOrgSiteListNotEmpty PHP Method

testOrgSiteListNotEmpty() public method

Tests the org:site:list command
    public function testOrgSiteListNotEmpty()
    {
        $data = ['id' => 'site_id', 'name' => 'Site Name'];
        $this->sites->expects($this->once())->method('all')->with()->willReturn([$this->site]);
        $this->site->expects($this->any())->method('serialize')->willReturn($data);
        $this->logger->expects($this->never())->method('log');
        $out = $this->command->listSites($this->organization->id);
        $this->assertInstanceOf('Consolidation\\OutputFormatters\\StructuredData\\RowsOfFields', $out);
        $this->assertEquals([$data], $out->getArrayCopy());
    }