PageRenderTime 62ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/scripts/phpspec.php

http://github.com/phpspec/phpspec
PHP | 184 lines | 12 code | 2 blank | 170 comment | 0 complexity | b70e05a572121c833d30b2e356ca4549 MD5 | raw file
  1. #!/usr/bin/php
  2. <?php
  3. /**
  4. * PHPSpec
  5. *
  6. * GNU LESSER GENERAL PUBLIC LICENSE
  7. * Version 3, 29 June 2007
  8. *
  9. * Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
  10. * Everyone is permitted to copy and distribute verbatim copies
  11. * of this license document, but changing it is not allowed.
  12. *
  13. *
  14. * This version of the GNU Lesser General Public License incorporates
  15. * the terms and conditions of version 3 of the GNU General Public
  16. * License, supplemented by the additional permissions listed below.
  17. *
  18. * 0. Additional Definitions.
  19. *
  20. * As used herein, "this License" refers to version 3 of the GNU Lesser
  21. * General Public License, and the "GNU GPL" refers to version 3 of the GNU
  22. * General Public License.
  23. *
  24. * "The Library" refers to a covered work governed by this License,
  25. * other than an Application or a Combined Work as defined below.
  26. *
  27. * An "Application" is any work that makes use of an interface provided
  28. * by the Library, but which is not otherwise based on the Library.
  29. * Defining a subclass of a class defined by the Library is deemed a mode
  30. * of using an interface provided by the Library.
  31. *
  32. * A "Combined Work" is a work produced by combining or linking an
  33. * Application with the Library. The particular version of the Library
  34. * with which the Combined Work was made is also called the "Linked
  35. * Version".
  36. *
  37. * The "Minimal Corresponding Source" for a Combined Work means the
  38. * Corresponding Source for the Combined Work, excluding any source code
  39. * for portions of the Combined Work that, considered in isolation, are
  40. * based on the Application, and not on the Linked Version.
  41. *
  42. * The "Corresponding Application Code" for a Combined Work means the
  43. * object code and/or source code for the Application, including any data
  44. * and utility programs needed for reproducing the Combined Work from the
  45. * Application, but excluding the System Libraries of the Combined Work.
  46. *
  47. * 1. Exception to Section 3 of the GNU GPL.
  48. *
  49. * You may convey a covered work under sections 3 and 4 of this License
  50. * without being bound by section 3 of the GNU GPL.
  51. *
  52. * 2. Conveying Modified Versions.
  53. *
  54. * If you modify a copy of the Library, and, in your modifications, a
  55. * facility refers to a function or data to be supplied by an Application
  56. * that uses the facility (other than as an argument passed when the
  57. * facility is invoked), then you may convey a copy of the modified
  58. * version:
  59. *
  60. * a) under this License, provided that you make a good faith effort to
  61. * ensure that, in the event an Application does not supply the
  62. * function or data, the facility still operates, and performs
  63. * whatever part of its purpose remains meaningful, or
  64. *
  65. * b) under the GNU GPL, with none of the additional permissions of
  66. * this License applicable to that copy.
  67. *
  68. * 3. Object Code Incorporating Material from Library Header Files.
  69. *
  70. * The object code form of an Application may incorporate material from
  71. * a header file that is part of the Library. You may convey such object
  72. * code under terms of your choice, provided that, if the incorporated
  73. * material is not limited to numerical parameters, data structure
  74. * layouts and accessors, or small macros, inline functions and templates
  75. * (ten or fewer lines in length), you do both of the following:
  76. *
  77. * a) Give prominent notice with each copy of the object code that the
  78. * Library is used in it and that the Library and its use are
  79. * covered by this License.
  80. *
  81. * b) Accompany the object code with a copy of the GNU GPL and this license
  82. * document.
  83. *
  84. * 4. Combined Works.
  85. *
  86. * You may convey a Combined Work under terms of your choice that,
  87. * taken together, effectively do not restrict modification of the
  88. * portions of the Library contained in the Combined Work and reverse
  89. * engineering for debugging such modifications, if you also do each of
  90. * the following:
  91. *
  92. * a) Give prominent notice with each copy of the Combined Work that
  93. * the Library is used in it and that the Library and its use are
  94. * covered by this License.
  95. *
  96. * b) Accompany the Combined Work with a copy of the GNU GPL and this license
  97. * document.
  98. *
  99. * c) For a Combined Work that displays copyright notices during
  100. * execution, include the copyright notice for the Library among
  101. * these notices, as well as a reference directing the user to the
  102. * copies of the GNU GPL and this license document.
  103. *
  104. * d) Do one of the following:
  105. *
  106. * 0) Convey the Minimal Corresponding Source under the terms of this
  107. * License, and the Corresponding Application Code in a form
  108. * suitable for, and under terms that permit, the user to
  109. * recombine or relink the Application with a modified version of
  110. * the Linked Version to produce a modified Combined Work, in the
  111. * manner specified by section 6 of the GNU GPL for conveying
  112. * Corresponding Source.
  113. *
  114. * 1) Use a suitable shared library mechanism for linking with the
  115. * Library. A suitable mechanism is one that (a) uses at run time
  116. * a copy of the Library already present on the user's computer
  117. * system, and (b) will operate properly with a modified version
  118. * of the Library that is interface-compatible with the Linked
  119. * Version.
  120. *
  121. * e) Provide Installation Information, but only if you would otherwise
  122. * be required to provide such information under section 6 of the
  123. * GNU GPL, and only to the extent that such information is
  124. * necessary to install and execute a modified version of the
  125. * Combined Work produced by recombining or relinking the
  126. * Application with a modified version of the Linked Version. (If
  127. * you use option 4d0, the Installation Information must accompany
  128. * the Minimal Corresponding Source and Corresponding Application
  129. * Code. If you use option 4d1, you must provide the Installation
  130. * Information in the manner specified by section 6 of the GNU GPL
  131. * for conveying Corresponding Source.)
  132. *
  133. * 5. Combined Libraries.
  134. *
  135. * You may place library facilities that are a work based on the
  136. * Library side by side in a single library together with other library
  137. * facilities that are not Applications and are not covered by this
  138. * License, and convey such a combined library under terms of your
  139. * choice, if you do both of the following:
  140. *
  141. * a) Accompany the combined library with a copy of the same work based
  142. * on the Library, uncombined with any other library facilities,
  143. * conveyed under the terms of this License.
  144. *
  145. * b) Give prominent notice with the combined library that part of it
  146. * is a work based on the Library, and explaining where to find the
  147. * accompanying uncombined form of the same work.
  148. *
  149. * 6. Revised Versions of the GNU Lesser General Public License.
  150. *
  151. * The Free Software Foundation may publish revised and/or new versions
  152. * of the GNU Lesser General Public License from time to time. Such new
  153. * versions will be similar in spirit to the present version, but may
  154. * differ in detail to address new problems or concerns.
  155. *
  156. * Each version is given a distinguishing version number. If the
  157. * Library as you received it specifies that a certain numbered version
  158. * of the GNU Lesser General Public License "or any later version"
  159. * applies to it, you have the option of following the terms and
  160. * conditions either of that published version or of any later version
  161. * published by the Free Software Foundation. If the Library as you
  162. * received it does not specify a version number of the GNU Lesser
  163. * General Public License, you may choose any version of the GNU Lesser
  164. * General Public License ever published by the Free Software Foundation.
  165. *
  166. * If the Library as you received it specifies that a proxy can decide
  167. * whether future versions of the GNU Lesser General Public License shall
  168. * apply, that proxy's public statement of acceptance of any version is
  169. * permanent authorization for you to choose that version for the
  170. * Library.
  171. */
  172. ini_set('display_errors', 1);
  173. error_reporting(E_ALL|E_STRICT);
  174. require_once 'PHPSpec/Loader/UniversalClassLoader.php';
  175. include_once 'Mockery.php';
  176. $paths = explode(':', ini_get('include_path'));
  177. $loader = new \PHPSpec\Loader\UniversalClassLoader();
  178. $loader->registerNamespace('PHPSpec', $paths);
  179. $loader->registerNamespace('Mockery', $paths);
  180. $loader->register();
  181. $phpspec = new \PHPSpec\PHPSpec($argv);
  182. $phpspec->execute();