Skip to content

Commit 57c6d3c

Browse files
committed
[Travis-CI] Debug tests
1 parent 527b949 commit 57c6d3c

2 files changed

Lines changed: 4 additions & 25 deletions

File tree

.travis.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ env:
88
global:
99
- CODACY_PROJECT_TOKEN=eb1f0554c46a4ae486c35d40f75b6d4e
1010
- CC_TEST_REPORTER_ID=cd1a1fbecb6b26000bcdc53d59b592735acb420dd96ce7151cd9424c39c95cf3
11-
- MULTITEST=off
1211
- COVERAGE=off
1312
- STYLECHECK=off
1413

@@ -17,16 +16,8 @@ matrix:
1716
- php: 7.4snapshot
1817
- php: 7.3
1918
env: COVERAGE=on
20-
- php: 7.2
21-
- php: 7.1
22-
- php: 7.0
23-
- php: 5.6
24-
- php: 5.5
25-
dist: trusty
2619
- php: 7.3
2720
env: STYLECHECK=on
28-
- php: 7.3
29-
env: MULTITEST=on
3021

3122
cache:
3223
apt: true
@@ -47,10 +38,9 @@ before_script:
4738
- if [[ "$COVERAGE" = "on" ]]; then ./cc-test-reporter before-build; fi;
4839

4940
script:
50-
- if [[ "$STYLECHECK" != "on" && "$COVERAGE" != "on" && "$MULTITEST" != "on" ]]; then vendor/bin/phpunit; fi;
41+
- if [[ "$STYLECHECK" != "on" && "$COVERAGE" != "on" ]]; then vendor/bin/phpunit; fi;
5142
- if [[ "$COVERAGE" = "on" ]]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml; fi;
5243
- if [[ "$MULTITEST" = "on" ]]; then vendor/bin/multi-tester --verbose --quiet-install; fi;
53-
- if [[ "$STYLECHECK" = "on" ]]; then vendor/bin/phpcs --ignore=*.js; fi;
5444

5545
after_success:
5646
- if [[ "$COVERAGE" = "on" ]]; then bash <(curl -s https://codecov.io/bash); fi;

tests/Phug/SplitTest.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,18 @@ class SplitTest extends TestCase
99
public function testShellOutput1()
1010
{
1111
$script = sys_get_temp_dir().'/script.sh';
12-
file_put_contents($script, "#!/bin/sh\necho $'something'");
12+
file_put_contents($script, "#!/bin/sh\necho $'something\n\\\\Yoh\n\n\\'la\\' hop\\\\'");
1313
chmod($script, 0777);
1414
$output = shell_exec(escapeshellcmd($script));
1515
unlink($script);
1616

17-
$this->assertSame('something', $output);
17+
$this->assertSame("something\n\\Yoh\n\n'la' hop\\", $output);
1818
}
1919

2020
public function testShellOutput2()
2121
{
2222
$script = sys_get_temp_dir().'/script.sh';
23-
file_put_contents($script, "#!/bin/sh\necho $\"something\"");
24-
chmod($script, 0777);
25-
$output = shell_exec(escapeshellcmd($script));
26-
unlink($script);
27-
28-
$this->assertSame('something', $output);
29-
}
30-
31-
public function testShellOutput3()
32-
{
33-
$script = sys_get_temp_dir().'/script.sh';
34-
file_put_contents($script, "#!/bin/sh\necho 'something\n\\Yoh\n\n\'la\' hop\\'");
23+
file_put_contents($script, "#!/bin/sh\necho 'something\n\\\\Yoh\n\n\\'la\\' hop\\\\'");
3524
chmod($script, 0777);
3625
$output = shell_exec(escapeshellcmd($script));
3726
unlink($script);

0 commit comments

Comments
 (0)