Inheritance: implements Sulu\Component\Webspace\Manager\WebspaceManagerInterface
Exemplo n.º 1
0
 public function testGetAllLocalizations()
 {
     $localizations = $this->webspaceManager->getAllLocalizations();
     array_walk($localizations, function (&$localization) {
         $localization = $localization->toArray();
         unset($localization['children']);
         unset($localization['localization']);
         unset($localization['shadow']);
         unset($localization['default']);
     });
     // check for duplicates
     $this->assertCount(7, $localizations);
     $this->assertContains(['country' => 'us', 'language' => 'en'], $localizations);
     $this->assertContains(['country' => 'at', 'language' => 'de'], $localizations);
     $this->assertContains(['country' => 'ca', 'language' => 'en'], $localizations);
     $this->assertContains(['country' => 'ca', 'language' => 'fr'], $localizations);
     $this->assertContains(['country' => null, 'language' => 'de'], $localizations);
     $this->assertContains(['country' => null, 'language' => 'en'], $localizations);
     $this->assertContains(['country' => 'uk', 'language' => 'en'], $localizations);
 }