Esempio n. 1
0
 /**
  * @test
  */
 public function registerTheNamespaceLoader()
 {
     if (version_compare(phpversion(), '5.3.0', '<')) {
         $this->markTestSkipped('Your PHP version is less than 5.3.0');
     }
     $loader = Stagehand_Autoload::namespaceLoader();
     $loader->addNamespace('Stagehand\\AutoloadTest');
     Stagehand_Autoload::register($loader);
     $this->assertTrue(class_exists('Stagehand\\AutoloadTest\\ClassForNamespaceLoader'));
 }
Esempio n. 2
0
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package    stagehand-php-class
 * @copyright  2009 KUMAKURA Yousuke <*****@*****.**>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License (revised)
 * @version    Release: @package_version@
 * @since      File available since Release 0.1.0
 */
error_reporting(E_ALL);
set_include_path(realpath(dirname(__FILE__)) . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../src') . PATH_SEPARATOR . get_include_path());
require_once 'PHPUnit/Framework.php';
require_once 'Stagehand/Autoload.php';
$loader = Stagehand_Autoload::getLegacyLoader();
$loader->addNamespace('Stagehand');
Stagehand_Autoload::register($loader);
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * indent-tabs-mode: nil
 * End:
 */
Esempio n. 3
0
 * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
 * @version    Release: @package_version@
 * @since      File available since Release 2.10.0
 */
error_reporting(E_ALL);
if (defined('E_DEPRECATED')) {
    error_reporting(error_reporting() & ~E_DEPRECATED);
}
set_include_path(realpath(dirname(__FILE__)) . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../examples') . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../vendor') . PATH_SEPARATOR . realpath(dirname(__FILE__) . '/../src') . PATH_SEPARATOR . get_include_path());
@(require_once 'PHPUnit/Framework.php');
// TODO Remove this if Stagehand_TestRunner will not support PHPUnit 3.4.
require_once 'Stagehand/Autoload.php';
$legacyLoader = Stagehand_Autoload::legacyLoader();
$legacyLoader->addNamespace('Stagehand');
Stagehand_Autoload::register($legacyLoader);
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
    $namespaceLoader = Stagehand_Autoload::namespaceLoader();
    $namespaceLoader->addNamespace('Stagehand\\TestRunner');
    Stagehand_Autoload::register($namespaceLoader);
}
Stagehand_LegacyError_PHPError::enableConversion(error_reporting());
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * indent-tabs-mode: nil
 * End:
 */