PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/tasks/ext/simpletest/SimpleTestFormatterElement.php

https://bitbucket.org/ealexandru/jobeet
PHP | 61 lines | 29 code | 3 blank | 29 comment | 6 complexity | 1d65c5768323f151b291703335cbcfb2 MD5 | raw file
Possible License(s): ISC, AGPL-3.0, LGPL-2.1, BSD-3-Clause, LGPL-3.0
  1. <?php
  2. /**
  3. * $Id: SimpleTestFormatterElement.php 357 2008-02-26 08:51:59Z mrook $
  4. *
  5. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  6. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  7. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  8. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  9. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16. *
  17. * This software consists of voluntary contributions made by many individuals
  18. * and is licensed under the LGPL. For more information please see
  19. * <http://phing.info>.
  20. */
  21. require_once 'phing/tasks/ext/simpletest/SimpleTestPlainResultFormatter.php';
  22. require_once 'phing/tasks/ext/simpletest/SimpleTestSummaryResultFormatter.php';
  23. require_once 'phing/tasks/ext/phpunit/FormatterElement.php';
  24. /**
  25. * Child class of "FormatterElement", overrides setType to provide other
  26. * formatter classes for SimpleTest
  27. *
  28. * @author Michiel Rook <michiel.rook@gmail.com>
  29. * @version $Id: SimpleTestFormatterElement.php 357 2008-02-26 08:51:59Z mrook $
  30. * @package phing.tasks.ext.simpletest
  31. * @since 2.2.0
  32. */
  33. class SimpleTestFormatterElement extends FormatterElement
  34. {
  35. function setType($type)
  36. {
  37. $this->type = $type;
  38. if ($this->type == "xml")
  39. {
  40. $destFile = new PhingFile($this->toDir, 'testsuites.xml');
  41. //$this->formatter = new SimpleTestXmlResultFormatter();
  42. }
  43. else
  44. if ($this->type == "plain")
  45. {
  46. $this->formatter = new SimpleTestPlainResultFormatter();
  47. }
  48. else
  49. if ($this->type == "summary")
  50. {
  51. $this->formatter = new SimpleTestSummaryResultFormatter();
  52. }
  53. else
  54. {
  55. throw new BuildException("Formatter '" . $this->type . "' not implemented");
  56. }
  57. }
  58. }