7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
16 * @package Zend_Filter
17 * @subpackage UnitTests
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
27 require_once dirname(__FILE__
) . '/../../TestHelper.php';
30 * @see Zend_Filter_BaseName
32 require_once 'Zend/Filter/BaseName.php';
37 * @package Zend_Filter
38 * @subpackage UnitTests
39 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
40 * @license http://framework.zend.com/license/new-bsd New BSD License
43 class Zend_Filter_BaseNameTest
extends PHPUnit_Framework_TestCase
46 * Zend_Filter_BaseName object
48 * @var Zend_Filter_BaseName
53 * Creates a new Zend_Filter_BaseName object for each test method
57 public function setUp()
59 $this->_filter
= new Zend_Filter_BaseName();
63 * Ensures that the filter follows expected behavior
67 public function testBasic()
69 $valuesExpected = array(
70 '/path/to/filename' => 'filename',
71 '/path/to/filename.ext' => 'filename.ext'
73 foreach ($valuesExpected as $input => $output) {
74 $this->assertEquals($output, $this->_filter
->filter($input));