ZF-8222: format class name for class checks
[zend.git] / tests / Zend / Filter / BaseNameTest.php
blob4a6d1c9ae477219a5c216a8fdefe0bfc94f3b323
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
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
20 * @version $Id$
24 /**
25 * Test helper
27 require_once dirname(__FILE__) . '/../../TestHelper.php';
29 /**
30 * @see Zend_Filter_BaseName
32 require_once 'Zend/Filter/BaseName.php';
35 /**
36 * @category Zend
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
41 * @group Zend_Filter
43 class Zend_Filter_BaseNameTest extends PHPUnit_Framework_TestCase
45 /**
46 * Zend_Filter_BaseName object
48 * @var Zend_Filter_BaseName
50 protected $_filter;
52 /**
53 * Creates a new Zend_Filter_BaseName object for each test method
55 * @return void
57 public function setUp()
59 $this->_filter = new Zend_Filter_BaseName();
62 /**
63 * Ensures that the filter follows expected behavior
65 * @return void
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));