File tree Expand file tree Collapse file tree 2 files changed +62
-11
lines changed
Expand file tree Collapse file tree 2 files changed +62
-11
lines changed Original file line number Diff line number Diff line change 77 - vendor
88 - $HOME/.composer/cache/files
99
10- php :
11- - 5.4
12- - 5.5
13- - 5.6
14- - 7.0
15- - 7.1
16- - 7.2
17- - 7.3
18-
1910env :
2011 - TWIG_EXT=no
2112
2213before_install :
23- # turn off XDebug
2414 - phpenv config-rm xdebug.ini || return 0
2515
2616install :
@@ -32,12 +22,22 @@ before_script:
3222
3323script : ./vendor/bin/simple-phpunit
3424
35- matrix :
25+ jobs :
3626 fast_finish : true
3727 include :
28+ - php : 5.4
3829 - php : 5.4
3930 env : TWIG_EXT=yes
31+ - php : 5.5
4032 - php : 5.5
4133 env : TWIG_EXT=yes
34+ - php : 5.6
4235 - php : 5.6
4336 env : TWIG_EXT=yes
37+ - php : 7.0
38+ - php : 7.1
39+ - php : 7.2
40+ - php : 7.3
41+ - stage : integration tests
42+ php : 7.3
43+ script : ./drupal_test.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -x
4+ set -e
5+
6+ REPO=` pwd`
7+ cd /tmp
8+ rm -rf drupal-twig-test
9+ composer create-project --no-interaction drupal-composer/drupal-project:8.x-dev drupal-twig-test
10+ cd drupal-twig-test
11+ (cd vendor/twig && rm -rf twig && ln -sf $REPO twig)
12+ echo ' $config["system.logging"]["error_level"] = "verbose";' >> web/sites/default/settings.php
13+ php ./web/core/scripts/drupal install --no-interaction demo_umami 2> /dev/null > output
14+ perl -p -i -e ' s/^([A-Za-z]+)\: (.+)$/export DRUPAL_\1=\2/' output
15+ source output
16+
17+ wget https://get.symfony.com/cli/installer -O - | bash
18+ export PATH=" $HOME /.symfony/bin:$PATH "
19+ symfony server:start -d --no-tls
20+ ENDPOINT=` symfony server:status -no-ansi | sed -E ' s/^.+ http/http/' `
21+
22+ curl -OLsS https://get.blackfire.io/blackfire-player.phar
23+ chmod +x blackfire-player.phar
24+ cat > drupal-tests.bkf << EOF
25+ name "Drupal tests"
26+
27+ scenario
28+ name "homepage"
29+ set name "admin"
30+ set pass "pass"
31+
32+ visit url('/')
33+ expect status_code() == 200
34+ click link('Articles')
35+ expect status_code() == 200
36+ click link('Dairy-free and delicious milk chocolate')
37+ expect body() matches "/Dairy\-free milk chocolate is made in largely the same way as regular chocolate/"
38+ expect status_code() == 200
39+ click link('Log in')
40+ expect status_code() == 200
41+ submit button("Log in")
42+ param name name
43+ param pass pass
44+ expect status_code() == 303
45+ follow
46+ expect status_code() == 200
47+ click link('Structure')
48+ expect status_code() == 200
49+ EOF
50+ ./blackfire-player.phar run drupal-tests.bkf --endpoint=$ENDPOINT --variable name=$DRUPAL_Username --variable pass=$DRUPAL_Password
51+ symfony server:stop
You can’t perform that action at this time.
0 commit comments