Login   Register  
PHP Classes
elePHPant
Icontem

File: tests/cacheManagerAPCTest.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Camilo Sperberg  >  Cache Manager  >  tests/cacheManagerAPCTest.php  >  Download  
File: tests/cacheManagerAPCTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Cache Manager
Manage cache containers to store and retrieve data
Author: By
Last change:
Date: 1 year ago
Size: 1,492 bytes
 

Contents

Class file image Download
<?php
require_once '../cacheManager.class.php';
require_once 
'PHPUnit/Framework/TestCase.php';


/**
 * cacheManager test case.
 */
class cacheManagerAPCTest extends PHPUnit_Framework_TestCase {
    
/**
     *
     * @var cacheManager
     */
    
private $cacheManager;

    
/**
     * Prepares the environment before running a test.
     */
    
protected function setUp() {
        
parent::setUp();
        
$this->cacheManager = new cacheManager('apc');
    }

    
/**
     * Cleans up the environment after running a test.
     */
    
protected function tearDown() {
        
$this->cacheManager null;
        
parent::tearDown();
    }

    public function 
provider__call() {
        
$languageIds = array('en_US''en_UK''nl_NL''es_ES''es_CL');

        
$mapValues = array(
            array(
'load', array('languageMessages'$languageIds), false),
        );

        return 
$mapValues;
    }
    
/**
     * Tests cacheManager->__call()
     *
     * @dataProvider provider__call
     */
    
public function test__call($func$args$expected) {
        
$result $this->cacheManager->$func($args);
        
$this->assertEquals($expected$result);
    }

    
/**
     * Tests cacheManager->throwExceptions()
     */
    
public function testThrowExceptions() {
        
// TODO Auto-generated cacheManagerTestAPC->testThrowExceptions()
        
$this->markTestIncomplete("throwExceptions test not implemented");
        
$this->cacheManager->throwExceptions(/* parameters */);
    }
}