/** * @param \Lertify\Lastfm\Api\Data\PagedCollection $PagedCollection */ protected function assertShoutsCollection(PagedCollection $PagedCollection) { $this->assertInternalType('int', $PagedCollection->count(), 'Is not an integer value'); $this->assertInternalType('int', $PagedCollection->countPages(), 'Is not an integer value'); $this->assertFalse($PagedCollection->isEmpty(), 'Current result should not be empty'); $ShoutsCollection = $PagedCollection->getPage(1); $this->assertInstanceOf('Lertify\\Lastfm\\Api\\Data\\Album\\ShoutsCollection', $ShoutsCollection, 'ShoutsCollection is not an instance of Data\\Album\\ShoutsCollection'); $this->assertInstanceOf('Lertify\\Lastfm\\Api\\Data\\ArrayCollection', $ShoutsCollection, 'ShoutsCollection is not an instance of Data\\ArrayCollection'); /** @var \Lertify\Lastfm\Api\Data\Album\Shout $Shout */ foreach ($ShoutsCollection as $Shout) { $this->assertInstanceOf('Lertify\\Lastfm\\Api\\Data\\Album\\Shout', $Shout, 'Shout is not an instance of Data\\Album\\Shout'); $this->assertInstanceOf('DateTime', $Shout->getDate(), 'Shout date is not an instance of DateTime'); } }