ConfigurationTest.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of the Finder Facade package.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace SebastianBergmann\FinderFacade;
  11. class ConfigurationTest extends \PHPUnit_Framework_TestCase
  12. {
  13. protected $fixtureDir;
  14. protected function setUp()
  15. {
  16. $this->fixtureDir = __DIR__ . DIRECTORY_SEPARATOR . 'fixture' . DIRECTORY_SEPARATOR;
  17. }
  18. /**
  19. * @covers SebastianBergmann\FinderFacade\Configuration::__construct
  20. * @covers SebastianBergmann\FinderFacade\Configuration::parse
  21. * @covers SebastianBergmann\FinderFacade\Configuration::toAbsolutePath
  22. */
  23. public function testXmlFileCanBeParsed()
  24. {
  25. $configuration = new Configuration($this->fixtureDir . 'test.xml');
  26. $this->assertEquals(
  27. array(
  28. 'items' => array(
  29. $this->fixtureDir . 'foo',
  30. $this->fixtureDir . 'bar.phtml'
  31. ),
  32. 'excludes' => array('bar'),
  33. 'names' => array('*.php'),
  34. 'notNames' => array('*.fail.php'),
  35. 'regularExpressionExcludes' => array()
  36. ),
  37. $configuration->parse()
  38. );
  39. }
  40. }