File tree Expand file tree Collapse file tree 6 files changed +94
-1
lines changed Expand file tree Collapse file tree 6 files changed +94
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+ functional_tests_orm :
3
+ @if [ " ${CONSOLE} " = " " ]; then echo " Console executable missing" ; exit 1; fi
4
+ @echo
5
+ @echo ' +++ create ORM database +++'
6
+ @${CONSOLE} doctrine:schema:drop --env=orm --force
7
+ @${CONSOLE} doctrine:database:create --env=orm
8
+ @${CONSOLE} doctrine:schema:create --env=orm
9
+ @echo ' +++ run ORM functional tests +++'
10
+ @vendor/bin/simple-phpunit --testsuite " functional tests with orm"
11
+ @${CONSOLE} doctrine:database:drop --force
Original file line number Diff line number Diff line change
1
+
2
+ functional_tests_phpcr :
3
+ @if [ " ${CONSOLE} " = " " ]; then echo " Console executable missing" ; exit 1; fi
4
+ @echo
5
+ @echo ' +++ create PHPCR +++'
6
+ @${CONSOLE} doctrine:phpcr:init:dbal --drop --force
7
+ @${CONSOLE} doctrine:phpcr:repository:init
8
+ @echo ' +++ run PHPCR functional tests +++'
9
+ @vendor/bin/simple-phpunit --testsuite " functional tests with phpcr"
10
+ @${CONSOLE} doctrine:database:drop --force
Original file line number Diff line number Diff line change
1
+
2
+ test_installation :
3
+ @if [ " ${PACKAGE} " = " " ] || [ " ${VERSION} " = " " ]; then echo " Package name or version missing" ; exit 1; fi
4
+ @echo
5
+ @echo ' +++ testing installation into a blank symfony application +++'
6
+ vendor/symfony-cmf/testing/bin/scripts/check_install.sh -p${PACKAGE} -v${VERSION}
Original file line number Diff line number Diff line change
1
+
2
+ unit_tests :
3
+ @echo
4
+ @echo ' +++ run unit tests +++'
5
+ @vendor/bin/simple-phpunit --testsuite " unit tests"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ usage=" $( basename " $0 " ) [-hl] [-t] -- Script to test a bundle installation with on a symfony application.
4
+ where:
5
+ -h show help text
6
+ -p The complete package name of the bundle;"
7
+
8
+ BASE_DIR=${PWD}
9
+ BUILD_DIR=${BASE_DIR} /build
10
+
11
+ PACKAGE_NAME=' '
12
+ VERSION=' dev-master'
13
+
14
+ function installBundle() {
15
+ DIR=${BUILD_DIR} /${PACKAGE_NAME} /${VERSION}
16
+
17
+ mkdir -p ${DIR}
18
+ echo " Create directory ${DIR} "
19
+ cd ${DIR}
20
+ echo " +++ Create Symfony skeleton app +++ "
21
+ composer create-project " symfony/skeleton:^3.3" test-app
22
+ cd test-app/
23
+ composer config extra.symfony.allow-contrib true
24
+ if [ " ${VERSION} " = " dev" * ]; then perl -pi -e ' s/^}$/,"minimum-stability":"dev"}/' composer.json; fi
25
+ REQUIRE=${PACKAGE_NAME} " :" ${VERSION}
26
+ echo " +++ Require bundle ${REQUIRE} +++"
27
+ composer req -n " ${REQUIRE} "
28
+ OUT=$?
29
+ if [ ${OUT} -eq 0 ]; then
30
+ echo " +++ Install is fine +++"
31
+ exit 0
32
+ else
33
+ echo " +++ Problems to install package +++"
34
+ exit ${OUT}
35
+ fi
36
+ echo $?
37
+ echo " +++ We should fetch composer exit code here +++"
38
+ }
39
+
40
+ while getopts :hv:p: option
41
+ do
42
+ case " ${option} "
43
+ in
44
+ p) PACKAGE_NAME=${OPTARG} ;;
45
+ v) VERSION=${OPTARG} ;;
46
+ h) echo " ${usage} "
47
+ exit 1
48
+ ;;
49
+ :) printf " missing argument for -%s\n" " $OPTARG " >&2
50
+ echo " $usage " >&2
51
+ exit 1
52
+ ;;
53
+ \? ) printf " illegal option: -%s\n" " $OPTARG " >&2
54
+ echo " $usage " >&2
55
+ exit 1
56
+ ;;
57
+ esac
58
+ done
59
+
60
+ installBundle
61
+
Original file line number Diff line number Diff line change 7
7
>
8
8
9
9
<testsuites >
10
- <testsuite name =" Symfony CmfMenuBundle Test Suite" >
10
+ <testsuite name =" Symfony Testing Component Test Suite" >
11
11
<directory >./tests</directory >
12
12
</testsuite >
13
13
</testsuites >
You can’t perform that action at this time.
0 commit comments