Location: PHPKode > projects > TeamSpeak3 ChannelWatcher > devMX-TeamSpeak3-ChannelWatcher-f5257dd/tests/src/devmx/ChannelWatcher/Rule/SaveParentRuleTest.php
<?php

namespace devmx\ChannelWatcher\Rule;

require_once dirname( __FILE__ ) . '/../../../../../src/devmx/ChannelWatcher/Rule/SaveParentRule.php';

/**
 * Test class for SaveParentRule.
 * Generated by PHPUnit on 2012-05-29 at 16:07:20.
 */
class SaveParentRuleTest extends \PHPUnit_Framework_TestCase
{

    
    public function testFilter() {
        $list = array(
            1 => array(
                'cid' => 1,
                'pid' => 0,
                '__delete' => true
            ),
            2 => array(
                'cid' => 2,
                'pid' => 1,
                '__delete' => true,
            ),
            3 => array(
                'cid' => 3,
                'pid' => 2,
                '__delete' => false
            )
        );
        $rule = new SaveParentRule;
        $expected = $list;
        $expected[1]['__delete'] = false;
        $expected[2]['__delete'] = false;
        $this->assertEquals($expected, $rule->filter($list));
    }

}

?>
Return current item: TeamSpeak3 ChannelWatcher