Permalink
Browse files

Fixed travis integration. Updated docs.

  • Loading branch information...
1 parent 2a0de6b commit 37bf500d79ebc6119a9105859f4014d1211c96f6 Vitaliy Demidov committed Aug 16, 2012
Showing with 59 additions and 32 deletions.
  1. +3 −0 .gitignore
  2. +1 −1 .travis.yml
  3. +25 −1 Resources/doc/reporting_issue.md
  4. +0 −1 Tests/Functional/AppKernel.php
  5. +0 −23 Tests/autoload.php.dist
  6. +11 −5 Tests/bootstrap.php
  7. +19 −1 composer.json
View
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
View
@@ -9,7 +9,7 @@ env:
before_script:
- curl -s http://getcomposer.org/installer | php
- - php composer.phar --dev install
+ - php composer.phar install --dev
script: phpunit
@@ -26,7 +26,31 @@ to check that you have not broken anything.
## Running Tests
-`phpunit -c vendor/apy/jsfv-bundle/APY/JsFormValidationBundle`
+First of all you need to install dev dependencies.
+
+```bash
+# it assumes that you in the root folder of your app
+$ ls composer.phar
+composer.phar
+
+$ cd vendor/apy/jsfv-bundle/APY/JsFormValidationBundle
+
+$ ../../../../../composer.phar install --dev
+
+# then you can run tests of apy/jsfv-bundle
+$ phpunit -c .
+PHPUnit 3.6.10 by Sebastian Bergmann.
+
+Configuration read from root-folder-of-your-app\vendor\apy\jsfv-bundle\APY\JsFormValidationBundle\phpunit.xml.dist
+
+....
+
+Time: 9 seconds, Memory: 30.75Mb
+
+←[30;42m←[2KOK (4 tests, 50 assertions)
+←[0m←[2K
+```
+
###PHPUnit
To run the Symfony2 test suite, install PHPUnit 3.5.11 or later:
@@ -51,7 +51,6 @@ public function registerBundles()
return array(
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new \Symfony\Bundle\TwigBundle\TwigBundle(),
- new \Symfony\Bundle\MonologBundle\MonologBundle(),
new \Symfony\Bundle\AsseticBundle\AsseticBundle(),
new \Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new \Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
View
@@ -1,23 +0,0 @@
-<?php
-
-use \Doctrine\Common\Annotations\AnnotationRegistry;
-
-if (!file_exists($file = __DIR__.'/../vendor/autoload.php')) {
- // It searches for the autoload file of your project, and includes it
- $dir = __DIR__;
- $lastDir = null;
- while (($dir = dirname($dir)) && $dir !== $lastDir) {
- $lastDir = $dir;
- if (file_exists($file = $dir . '/app/bootstrap.php.cache')) {
- $loader = require $file;
- AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
- return;
- }
- }
- throw new \RuntimeException(
- 'Did you run "composer install --dev"? Please install dependencies using Composer to run the test suite.'
- );
-} else {
- $loader = require $file;
- AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
-}
View
@@ -1,6 +1,12 @@
<?php
-if (file_exists($file = __DIR__ . '/autoload.php')) {
- require_once $file;
-} elseif (file_exists($file = __DIR__ . '/autoload.php.dist')) {
- require_once $file;
-}
+
+use Doctrine\Common\Annotations\AnnotationRegistry;
+
+call_user_func(function() {
+ if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) {
+ throw new \RuntimeException('Could not find vendor/autoload.php. Did you run "composer install --dev"?');
+ }
+
+ $loader = require $autoloadFile;
+ AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
+});
View
@@ -16,7 +16,25 @@
"willdurand/expose-translation-bundle": "dev-master"
},
"require-dev": {
- "monolog/monolog": "dev-master"
+ "symfony/assetic-bundle": "2.*",
+ "doctrine/orm": "*",
+ "doctrine/doctrine-bundle": "*",
+ "symfony/filesystem": "2.*",
+ "sensio/framework-extra-bundle": "*",
+ "symfony/css-selector": "2.*",
+ "symfony/http-kernel": "2.*",
+ "symfony/validator": "2.*",
+ "symfony/browser-kit": "2.*",
+ "symfony/finder": "2.*",
+ "symfony/form": "2.*",
+ "symfony/yaml": "2.*",
+ "symfony/process": "2.*",
+ "symfony/class-loader": "2.*",
+ "symfony/twig-bundle": "2.*",
+ "sensio/framework-extra-bundle": "*",
+ "jms/di-extra-bundle": "*",
+ "jms/aop-bundle": "*",
+ "willdurand/expose-translation-bundle": "master-dev"
},
"autoload": {
"psr-0": { "APY\\JsFormValidationBundle": "" }

0 comments on commit 37bf500

Please sign in to comment.