PHP Classes

File: tests/unit/Filter/IteratorTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Filter/IteratorTest.php   Download  
File: tests/unit/Filter/IteratorTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 639 bytes
 

Contents

Class file image Download
<?php
   
class Filter_IteratorTest extends UnitTestCase
{
   
    function
testFilter_IteratorTolowerSingle()
    {
       
$filter = new A_Filter_Tolower('foo', '');
       
$filterIterator = new A_Filter_Iterator($filter);
       
       
$data = 'FoO';
       
$result = $filterIterator->doFilter($data);
       
       
$this->assertEqual('foo', $result);
    }
   
    function
testFilter_IteratorTolowerMultiple()
    {
       
$filter = new A_Filter_Tolower(null, '');
       
$filterIterator = new A_Filter_Iterator($filter);
       
       
$data = array('fOo', 'BAR', 'baZ');
       
$result = $filterIterator->doFilter($data);
       
$this->assertEqual(array('foo', 'bar', 'baz'), $result);
    }
}