Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switched to composer to run the test suite

  • Loading branch information...
commit 1f35b6b55bc0155f86cea138879fe70e3cffd8cf 1 parent 8ffda73
@willdurand willdurand authored
View
10 .gitignore
@@ -1,6 +1,4 @@
-/Model/*/map
-/Model/*/om
-vendor/phing/
-vendor/propel/
-vendor/symfony/
-vendor/Sensio/
+Model/*/map
+Model/*/om
+vendor
+composer.lock
View
4 .travis.yml
@@ -7,6 +7,8 @@ php:
env:
- SYMFONY_VERSION=origin/master
-before_script: php vendor/install_vendors.php
+before_script:
+ - curl -s http://getcomposer.org/installer | php
+ - php composer.phar --dev install
script: phpunit --coverage-text
View
2  Tests/Command/PropelGeneratorAwareCommandTest.php
@@ -26,7 +26,7 @@ protected function setUp()
parent::setUp();
$this->container = $this->getContainer();
- $this->container->setParameter('propel.path', __DIR__ . '/../../vendor/propel');
+ $this->container->setParameter('propel.path', __DIR__ . '/../../vendor/propel/propel1');
}
public function testGetDatabasesFromSchema()
View
12 Tests/TestCase.php
@@ -22,7 +22,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- if (!file_exists($file = __DIR__.'/../vendor/propel/runtime/lib/Propel.php')) {
+ if (!file_exists($file = __DIR__ . '/../vendor/propel/propel1/runtime/lib/Propel.php')) {
$this->markTestSkipped('Propel is not available.');
}
@@ -39,10 +39,10 @@ public function getContainer()
protected function loadPropelQuickBuilder()
{
- require_once __DIR__.'/../vendor/propel/runtime/lib/Propel.php';
- require_once __DIR__.'/../vendor/propel/runtime/lib/adapter/DBAdapter.php';
- require_once __DIR__.'/../vendor/propel/runtime/lib/adapter/DBSQLite.php';
- require_once __DIR__.'/../vendor/propel/runtime/lib/connection/PropelPDO.php';
- require_once __DIR__.'/../vendor/propel/generator/lib/util/PropelQuickBuilder.php';
+ require_once __DIR__ . '/../vendor/propel/propel1/runtime/lib/Propel.php';
+ require_once __DIR__ . '/../vendor/propel/propel1/runtime/lib/adapter/DBAdapter.php';
+ require_once __DIR__ . '/../vendor/propel/propel1/runtime/lib/adapter/DBSQLite.php';
+ require_once __DIR__ . '/../vendor/propel/propel1/runtime/lib/connection/PropelPDO.php';
+ require_once __DIR__ . '/../vendor/propel/propel1/generator/lib/util/PropelQuickBuilder.php';
}
}
View
29 Tests/autoload.php.dist
@@ -1,30 +1,5 @@
<?php
-$vendorDir = __DIR__.'/../vendor';
-require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+require_once __DIR__ . '/../vendor/autoload.php';
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Symfony' => array($vendorDir.'/symfony/src'),
- 'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir),
-));
-$loader->registerPrefixes(array(
- 'Twig_' => $vendorDir.'/symfony/vendor/twig/lib',
-));
-$loader->register();
-
-set_include_path(get_include_path() . PATH_SEPARATOR . $vendorDir.'/phing/classes');
-
-spl_autoload_register(function($class) {
- if (0 === strpos($class, 'Propel\\PropelBundle\\')) {
- $path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
- if (!stream_resolve_include_path($path)) {
- return false;
- }
- require_once $path;
-
- return true;
- }
-});
+set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../vendor/phing/phing/classes');
View
6 composer.json
@@ -12,6 +12,12 @@
"symfony/framework-bundle": "2.*",
"propel/propel1": "1.6.*"
},
+ "require-dev": {
+ "symfony/symfony": "2.1.*",
+ "phing/phing": "2.4.*",
+ "sensio/framework-extra-bundle": "*",
+ "twig/twig": "1.7.*"
+ },
"autoload": {
"psr-0": { "Propel\\PropelBundle": "" }
},
View
27 vendor/install_vendors.php
@@ -1,27 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-set_time_limit(0);
-
-$vendorDir = __DIR__;
-$deps = array(
- array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
- array('propel', 'http://github.com/propelorm/Propel', isset($_SERVER['PROPEL_VERSION']) ? $_SERVER['PROPEL_VERSION'] : 'origin/master'),
- array('phing', 'http://github.com/Xosofox/phing.git', 'origin/master'),
- array('Sensio/Bundle/FrameworkExtraBundle', 'http://github.com/sensio/SensioFrameworkExtraBundle.git', 'origin/master'),
-);
-
-foreach ($deps as $dep) {
- list($name, $url, $rev) = $dep;
-
- echo "> Installing/Updating $name\n";
-
- $installDir = $vendorDir.'/'.$name;
- if (!is_dir($installDir)) {
- system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir)));
- }
-
- system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
-}
-
-system(sprintf('cd %s && php vendors.php', escapeshellarg($vendorDir.'/symfony')));
Please sign in to comment.
Something went wrong with that request. Please try again.