Skip to content

Commit

Permalink
Move FileList class
Browse files Browse the repository at this point in the history
... from the `scripts` directory to the `tests` directory and namespace the class.
  • Loading branch information
jrfnl committed Aug 27, 2019
1 parent 0de03b7 commit 91e4384
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
</dir>
<file baseinstalldir="" name="AllTests.php" role="test" />
<file baseinstalldir="" name="bootstrap.php" role="test" />
<file baseinstalldir="" name="FileList.php" role="test" />
<file baseinstalldir="" name="TestSuite.php" role="test" />
<file baseinstalldir="" name="TestSuite7.php" role="test" />
</dir>
Expand Down Expand Up @@ -1957,6 +1958,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<install as="LICENCE" name="licence.txt" />
<install as="phpunit.xml" name="phpunit.xml.dist" />
<install as="AllTests.php" name="tests/AllTests.php" />
<install as="FileList.php" name="tests/FileList.php" />
<install as="TestSuite.php" name="tests/TestSuite.php" />
<install as="TestSuite7.php" name="tests/TestSuite7.php" />
<install as="tests/bootstrap.php" name="tests/bootstrap.php" />
Expand Down Expand Up @@ -1994,6 +1996,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<install as="phpunit.xml" name="phpunit.xml.dist" />
<install as="tests/AllTests.php" name="tests/AllTests.php" />
<install as="tests/bootstrap.php" name="tests/bootstrap.php" />
<install as="tests/FileList.php" name="tests/FileList.php" />
<install as="tests/TestSuite.php" name="tests/TestSuite.php" />
<install as="tests/TestSuite7.php" name="tests/TestSuite7.php" />
<install as="CodeSniffer/Core/AbstractMethodUnitTest.php" name="tests/Core/AbstractMethodUnitTest.php" />
Expand Down
2 changes: 2 additions & 0 deletions scripts/ValidatePEAR/ValidatePEARPackageXML.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/

use PHP_CodeSniffer\Tests\FileList;

/**
* Validate the PHP_CodeSniffer PEAR package.xml file.
*/
Expand Down
2 changes: 1 addition & 1 deletion scripts/validate-pear-package.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/

require_once __DIR__.'/ValidatePEAR/FileList.php';
require_once dirname(__DIR__).'/tests/FileList.php';
require_once __DIR__.'/ValidatePEAR/ValidatePEARPackageXML.php';

$validate = new ValidatePEARPackageXML();
Expand Down
11 changes: 3 additions & 8 deletions scripts/ValidatePEAR/FileList.php → tests/FileList.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<?php
/**
* Retrieve a filtered file list.
* Class to retrieve a filtered file list.
*
* PHP version 5
*
* @category PHP
* @package PHP_CodeSniffer
* @author Juliette Reinders Folmer <[email protected]>
* @copyright 2019 Juliette Reinders Folmer. All rights reserved.
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/

/**
* Class to create a file list with filtering.
*/
namespace PHP_CodeSniffer\Tests;

class FileList
{

Expand Down

0 comments on commit 91e4384

Please sign in to comment.