1<?php
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
3// +----------------------------------------------------------------------+
4// | PHP version 5                                                        |
5// +----------------------------------------------------------------------+
6// | Copyright (c) 1997-2004 The PHP Group                                |
7// +----------------------------------------------------------------------+
8// | This source file is subject to version 3.0 of the PHP license,       |
9// | that is bundled with this package in the file LICENSE, and is        |
10// | available through the world-wide-web at the following url:           |
11// | http://www.php.net/license/3_0.txt.                                  |
12// | If you did not receive a copy of the PHP license and are unable to   |
13// | obtain it through the world-wide-web, please send a note to          |
14// | license@php.net so we can mail you a copy immediately.               |
15// +----------------------------------------------------------------------+
16// | Authors: Claudio Bustos <cdx@users.sourceforge.net>                  |
17// |          Jens Bierkandt <schtorch@users.sourceforge.net>             |
18// +----------------------------------------------------------------------+
19//
20// $Id:
21
22require_once(dirname(__FILE__).'/../../Helpers.php');
23
24class PearTest extends PHPUnit_Framework_TestCase
25{
26    function setUp()
27    {
28        $this->oBeaut = new PHP_Beautifier();
29    }
30    /**
31     * Almost identical to original. The space after o before comment
32     * is arbitrary, so I can't predict when I have to put a new line
33     *
34     */
35    function testPearSample()
36    {
37        $sSample = dirname(__FILE__) . '/pear_sample_file.phps';
38        $sContent = file_get_contents($sSample);
39        $this->oBeaut->setInputFile($sSample);
40        $this->oBeaut->addFilter("Pear");
41        $this->oBeaut->process();
42        $this->assertEquals($sContent, $this->oBeaut->get());
43    }
44}
45
46?>
47