40 foreach ( $sitesArrays as $sitesArray ) {
41 $listInstances[] =
new SiteList( $sitesArray[0] );
44 return $this->
arrayWrap( $listInstances );
56 $siteArrays[] = $sites;
83 foreach ( $sites as $site ) {
99 foreach ( $sites as $site ) {
100 if (
is_int( $site->getInternalId() ) ) {
101 $this->
assertEquals( $site, $sites->getSiteByInternalId( $site->getInternalId() ) );
117 foreach ( $sites as $site ) {
118 $ids = $site->getNavigationIds();
119 foreach ( $ids as $navId ) {
120 $this->
assertEquals( $site, $sites->getSiteByNavigationId( $navId ) );
133 $this->
assertFalse( $sites->hasSite(
'non-existing-global-id' ) );
134 $this->
assertFalse( $sites->hasInternalId( 720101010 ) );
136 if ( !$sites->isEmpty() ) {
140 foreach ( $sites as $site ) {
141 $this->
assertTrue( $sites->hasSite( $site->getGlobalId() ) );
155 foreach ( $sites as $site ) {
156 if (
is_int( $site->getInternalId() ) ) {
157 $this->
assertTrue( $site, $sites->hasInternalId( $site->getInternalId() ) );
173 foreach ( $sites as $site ) {
174 $ids = $site->getNavigationIds();
175 foreach ( $ids as $navId ) {
176 $this->
assertTrue( $sites->hasNavigationId( $navId ) );
180 $this->
assertFalse( $sites->hasNavigationId(
'non-existing-navigation-id' ) );
198 foreach ( $sites as $site ) {
199 $expected[] = $site->getGlobalId();
226 foreach ( $list as $site ) {
227 $this->
assertTrue( $copy->hasInternalId( $site->getInternalId() ) );
229 foreach ( $site->getNavigationIds() as $navId ) {
231 $copy->hasNavigationId( $navId ),
232 'unserialized data expects nav id ' . $navId .
' for site ' . $site->getGlobalId()
unserialize( $serialized)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
testSerialization(SiteList $list)
siteListProvider
testGetSiteByInternalId( $sites)
siteListProvider
siteListProvider()
Returns instances of SiteList implementing objects.
testGetGlobalIdentifiers(SiteList $sites)
siteListProvider
siteArrayProvider()
Returns arrays with instances of Site implementing objects.
testGetSiteByGlobalId(SiteList $sites)
siteListProvider
testIsEmpty(SiteList $sites)
siteListProvider
testHasInternallId( $sites)
siteListProvider
testHasNavigationId( $sites)
siteListProvider
testGetSiteByNavigationId( $sites)
siteListProvider
testHasGlobalId( $sites)
siteListProvider
isEmpty()
Returns if the list contains no sites.
getGlobalIdentifiers()
Returns all the global site identifiers.
getSite( $globalSiteId)
Returns the Site with the provided global site identifier.