Skip to content

Commit 336731b

Browse files
committed
Added default console
- Updated travis init to use default console
1 parent b7f3281 commit 336731b

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

bin/console

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
$rootDir = realpath(__DIR__.'/../../../..');
5+
$vendorDir = realpath($rootDir.'/vendor');
6+
$phpUnitFile = $rootDir.'/phpunit.xml.dist';
7+
8+
if (!file_exists($phpUnitFile)) {
9+
throw new \Exception(sprintf(
10+
'Cannot find phpunit.xml.dist file in "%s"',
11+
$phpUnitFile
12+
));
13+
}
14+
15+
$xml = new \SimpleXMLElement(file_get_contents($phpUnitFile));
16+
$kernelDir = $xml->php[0]->server[0]['value'];
17+
18+
$kernelFile = $kernelDir.'/AppKernel.php';
19+
20+
if (!file_exists($kernelFile)) {
21+
throw new \Exception(sprintf(
22+
'Cannot find kernel file "%s"',
23+
$kernelFile
24+
));
25+
}
26+
27+
require_once $vendorDir.'/symfony-cmf/testing/bootstrap/bootstrap.php';
28+
require_once $kernelFile;
29+
30+
use Symfony\Bundle\FrameworkBundle\Console\Application;
31+
use Symfony\Component\Console\Input\ArgvInput;
32+
33+
$kernel = new AppKernel('test', true);
34+
$application = new Application($kernel);
35+
$application->run();

bin/travis/phpcr_odm_doctrine_dbal.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
DIR_NAME=`dirname $0`
4+
CONSOLE_DIR=$DIR_NAME"/.."
5+
36
# composer install --dev
4-
php Tests/Functional/App/console doctrine:phpcr:init:dbal
5-
php Tests/Functional/App/console doctrine:phpcr:repository:init
7+
php $CONSOLE_DIR"/console" doctrine:phpcr:init:dbal
8+
php $CONSOLE_DIR"/console" doctrine:phpcr:repository:init

0 commit comments

Comments
 (0)