Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Make tests for Filter package run standalone
Browse files Browse the repository at this point in the history
Refs #4
  • Loading branch information
eddieajau committed Mar 8, 2013
1 parent 0190944 commit 56ebf26
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/

namespace Joomla\Filter\Tests;

use Joomla\Filter\Input;
use Joomla\Filter\Output;

/**
* Test class for Filter\Input
*
* @package Joomla\Framework\Test
* @since 1.0
*/
class FilterInputTest extends PHPUnit_Framework_TestCase
class FilterInputTest extends \PHPUnit_Framework_TestCase
{
/**
* Produces the array of test cases common to all test runs.
Expand Down Expand Up @@ -491,7 +494,7 @@ public function testCleanText($data, $expect)
$this->markTestSkipped('Why are we calling JFilterOutput in JFilterInputTest?');
$this->assertThat(
$expect,
$this->equalTo(JFilterOutput::cleanText($data))
$this->equalTo(Output::cleanText($data))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* @license GNU General Public License version 2 or later; see LICENSE
*/

namespace Joomla\Filter\Tests;

use Joomla\Filter\Output;

/**
Expand Down Expand Up @@ -39,7 +41,7 @@ public function __construct()
* @package Joomla\Framework\Test
* @since 1.0
*/
class FilterOutputTest extends PHPUnit_Framework_TestCase
class FilterOutputTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Output
Expand Down
19 changes: 19 additions & 0 deletions vendor/Joomla/Filter/Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* @package Joomla\Framework\Test
* @copyright Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// Search for the Composer autoload file
$composerAutoload = __DIR__ . '/../../../../../autoload.php';

if (file_exists($composerAutoload))
{
include_once $composerAutoload;
}
else
// We're not installed via composer, so load our own autoloader.
{
include_once __DIR__ . '/../../../../tests/bootstrap.php';
}
8 changes: 8 additions & 0 deletions vendor/Joomla/Filter/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="Tests/bootstrap.php" colors="false">
<testsuites>
<testsuite name="Unit">
<directory>Tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 56ebf26

Please sign in to comment.