Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Add test for CM_Paging_Language_Enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dlondero committed Feb 16, 2015
1 parent 3b17f65 commit 82730c7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/library/CM/Paging/Language/EnabledTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

class CM_Paging_Language_EnabledTest extends CMTest_TestCase {

public function tearDown() {
CMTest_TH::clearEnv();
}

public function testEnabled() {
$english = CM_Model_Language::create('English', 'en', true);
$italian = CM_Model_Language::create('Italian', 'it', true);
$german = CM_Model_Language::create('German', 'de', true);
$french = CM_Model_Language::create('French', 'fr', true);
$svenska = CM_Model_Language::create('Svenska', 'sv', false);

$paging = new CM_Paging_Language_Enabled();
$this->assertEquals([$english, $french, $german, $italian], $paging->getItems());
$this->assertNotContains($svenska, $paging->getItems());
}
}

0 comments on commit 82730c7

Please sign in to comment.