Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Created travis config for functional tests

  • Loading branch information...
commit b0dfb6da6425103f7a2ed56d5cbc524db60dfcba 1 parent c0998b4
@mgiagnoni authored
View
1  .gitignore
@@ -2,5 +2,6 @@ phpunit.xml
vendor
composer.phar
composer.lock
+Tests/Functional/App/parameters.yml
Tests/Functional/App/cache
Tests/Functional/App/logs
View
2  .travis.yml
@@ -4,5 +4,7 @@ php:
- 5.3
before_script:
+ - cp Tests/Functional/App/parameters.yml.dist Tests/Functional/App/parameters.yml
+ - mysql -e 'create database lyra_test;' -u root
- curl -s http://getcomposer.org/installer | php
- php composer.phar install
View
8 Tests/Functional/AdminControllerTest.php
@@ -80,10 +80,10 @@ protected function setup()
$container = $client->getContainer();
$em = $container->get('doctrine')->getEntityManager();
$schemaTool = new \Doctrine\ORM\Tools\SchemaTool($em);
- $schemaTool->dropDatabase('lyra_test');
- $metadatas = $em->getMetadataFactory()->getAllMetadata();
- if (!empty($metadatas)) {
- $schemaTool->createSchema($metadatas);
+ $schemaTool->dropDatabase();
+ $metadata = $em->getMetadataFactory()->getAllMetadata();
+ if (!empty($metadata)) {
+ $schemaTool->createSchema($metadata);
}
}
}
View
11 Tests/Functional/App/config.yml
@@ -1,4 +1,5 @@
imports:
+ - { resource: parameters.yml }
- { resource: security.yml }
framework:
@@ -16,11 +17,11 @@ framework:
doctrine:
dbal:
- driver: pdo_mysql
- host: localhost
- dbname: lyra_test
- user: lyra_test
- password: lyra
+ driver: %database_driver%
+ host: %database_host%
+ dbname: %database_name%
+ user: %database_user%
+ password: %database_password%
charset: UTF8
orm:
View
7 Tests/Functional/App/parameters.yml.dist
@@ -0,0 +1,7 @@
+parameters:
+ database_driver: pdo_mysql
+ database_host: localhost
+ database_port: ~
+ database_name: lyra_test
+ database_user: root
+ database_password: ~
Please sign in to comment.
Something went wrong with that request. Please try again.