Skip to content

Commit 65ba3ad

Browse files
committed
rename targets and properties to kebab-case
1 parent eaf2f44 commit 65ba3ad

2 files changed

Lines changed: 37 additions & 37 deletions

File tree

tests/SymfonyCommandTaskIntegrationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SymfonyCommandTaskIntegrationTest extends \PHPUnit\Framework\TestCase
1818
public function callCommandDataProvider(): Generator
1919
{
2020
yield 'call command' => (static function (): array {
21-
$target = 'testCallCommand';
21+
$target = 'call-command';
2222

2323
return [
2424
'target' => $target,
@@ -28,7 +28,7 @@ public function callCommandDataProvider(): Generator
2828
})();
2929

3030
yield 'call command with custom executable' => (static function (): array {
31-
$target = 'testCallCommandWithCustomExecutable';
31+
$target = 'call-command-with-custom-executable';
3232

3333
return [
3434
'target' => $target,
@@ -38,7 +38,7 @@ public function callCommandDataProvider(): Generator
3838
})();
3939

4040
yield 'call command with custom app' => (static function (): array {
41-
$target = 'testCallCommandWithCustomApp';
41+
$target = 'call-command-with-custom-app';
4242

4343
return [
4444
'target' => $target,
@@ -48,7 +48,7 @@ public function callCommandDataProvider(): Generator
4848
})();
4949

5050
yield 'call command with custom executable and app' => (static function (): array {
51-
$target = 'testCallCommandWithCustomExecutableAndApp';
51+
$target = 'call-command-with-custom-executable-and-app';
5252

5353
return [
5454
'target' => $target,
@@ -58,7 +58,7 @@ public function callCommandDataProvider(): Generator
5858
})();
5959

6060
yield 'call command and override defaults' => (static function (): array {
61-
$target = 'testCallCommandAndOverrideDefaults';
61+
$target = 'call-command-and-override-defaults';
6262

6363
return [
6464
'target' => $target,
@@ -94,20 +94,20 @@ public function testCallCommand(
9494
public function testCallCommandWithAppAsExecutable(): void
9595
{
9696
$tester = new PhingTester(__DIR__ . '/symfony-command-task-integration-test.xml');
97-
$target = __FUNCTION__;
97+
$target = 'call-command-with-app-as-executable';
9898
$tester->executeTarget($target);
9999

100100
$tester->assertLogMessageRegExp(sprintf(
101101
'~executing.+%s.+hello:world~i',
102-
$tester->getProject()->getProperty(__FUNCTION__ . '.test.app')
102+
$tester->getProject()->getProperty($target . '.test.app')
103103
), $target, Project::MSG_VERBOSE);
104104
}
105105

106106
public function testMissingApp(): void
107107
{
108108
$buildFilePath = __DIR__ . '/symfony-command-task-integration-test.xml';
109109
$tester = new PhingTester($buildFilePath);
110-
$target = __FUNCTION__;
110+
$target = 'missing-app';
111111

112112
try {
113113
$tester->executeTarget($target);

tests/symfony-command-task-integration-test.xml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,67 @@
55

66
<taskdef name="symfony-cmd" classname="VasekPurchart\Phing\SymfonyCommand\SymfonyCommandTask"/>
77

8-
<target name="testCallCommand">
9-
<property name="testCallCommand.default.app" value="${project.basedir}/console"/>
10-
<property name="symfony-command.default.app" value="${testCallCommand.default.app}"/>
8+
<target name="call-command">
9+
<property name="call-command.default.app" value="${project.basedir}/console"/>
10+
<property name="symfony-command.default.app" value="${call-command.default.app}"/>
1111

12-
<property name="testCallCommand.default.executable" value="php"/>
13-
<property name="symfony-command.default.executable" value="${testCallCommand.default.executable}"/>
12+
<property name="call-command.default.executable" value="php"/>
13+
<property name="symfony-command.default.executable" value="${call-command.default.executable}"/>
1414

1515
<symfony-cmd cmd="hello:world"/>
1616
</target>
1717

18-
<target name="testCallCommandWithCustomExecutable">
19-
<property name="testCallCommandWithCustomExecutable.default.app" value="${project.basedir}/console"/>
20-
<property name="symfony-command.default.app" value="${testCallCommandWithCustomExecutable.default.app}"/>
18+
<target name="call-command-with-custom-executable">
19+
<property name="call-command-with-custom-executable.default.app" value="${project.basedir}/console"/>
20+
<property name="symfony-command.default.app" value="${call-command-with-custom-executable.default.app}"/>
2121

22-
<property name="testCallCommandWithCustomExecutable.test.executable" value="php"/>
22+
<property name="call-command-with-custom-executable.test.executable" value="php"/>
2323

24-
<symfony-cmd executable="${testCallCommandWithCustomExecutable.test.executable}" cmd="hello:world"/>
24+
<symfony-cmd executable="${call-command-with-custom-executable.test.executable}" cmd="hello:world"/>
2525
</target>
2626

27-
<target name="testCallCommandWithCustomApp">
28-
<property name="testCallCommandWithCustomApp.default.executable" value="php"/>
29-
<property name="symfony-command.default.executable" value="${testCallCommandWithCustomApp.default.executable}"/>
27+
<target name="call-command-with-custom-app">
28+
<property name="call-command-with-custom-app.default.executable" value="php"/>
29+
<property name="symfony-command.default.executable" value="${call-command-with-custom-app.default.executable}"/>
3030

31-
<property name="testCallCommandWithCustomApp.test.app" value="${project.basedir}/console"/>
31+
<property name="call-command-with-custom-app.test.app" value="${project.basedir}/console"/>
3232

33-
<symfony-cmd app="${testCallCommandWithCustomApp.test.app}" cmd="hello:world"/>
33+
<symfony-cmd app="${call-command-with-custom-app.test.app}" cmd="hello:world"/>
3434
</target>
3535

36-
<target name="testCallCommandWithCustomExecutableAndApp">
37-
<property name="testCallCommandWithCustomExecutableAndApp.test.app" value="${project.basedir}/console"/>
38-
<property name="testCallCommandWithCustomExecutableAndApp.test.executable" value="php"/>
36+
<target name="call-command-with-custom-executable-and-app">
37+
<property name="call-command-with-custom-executable-and-app.test.app" value="${project.basedir}/console"/>
38+
<property name="call-command-with-custom-executable-and-app.test.executable" value="php"/>
3939

4040
<symfony-cmd
41-
executable="${testCallCommandWithCustomExecutableAndApp.test.executable}"
42-
app="${testCallCommandWithCustomExecutableAndApp.test.app}"
41+
executable="${call-command-with-custom-executable-and-app.test.executable}"
42+
app="${call-command-with-custom-executable-and-app.test.app}"
4343
cmd="hello:world"
4444
/>
4545
</target>
4646

47-
<target name="testCallCommandWithAppAsExecutable">
48-
<property name="testCallCommandWithAppAsExecutable.test.app" value="${project.basedir}/console"/>
47+
<target name="call-command-with-app-as-executable">
48+
<property name="call-command-with-app-as-executable.test.app" value="${project.basedir}/console"/>
4949

50-
<symfony-cmd app="${testCallCommandWithAppAsExecutable.test.app}" cmd="hello:world"/>
50+
<symfony-cmd app="${call-command-with-app-as-executable.test.app}" cmd="hello:world"/>
5151
</target>
5252

53-
<target name="testCallCommandAndOverrideDefaults">
53+
<target name="call-command-and-override-defaults">
5454
<property name="symfony-command.default.app" value="XXX"/>
5555

5656
<property name="symfony-command.default.executable" value="YYY"/>
5757

58-
<property name="testCallCommandAndOverrideDefaults.test.app" value="${project.basedir}/console"/>
59-
<property name="testCallCommandAndOverrideDefaults.test.executable" value="php"/>
58+
<property name="call-command-and-override-defaults.test.app" value="${project.basedir}/console"/>
59+
<property name="call-command-and-override-defaults.test.executable" value="php"/>
6060

6161
<symfony-cmd
62-
executable="${testCallCommandAndOverrideDefaults.test.executable}"
63-
app="${testCallCommandAndOverrideDefaults.test.app}"
62+
executable="${call-command-and-override-defaults.test.executable}"
63+
app="${call-command-and-override-defaults.test.app}"
6464
cmd="hello:world"
6565
/>
6666
</target>
6767

68-
<target name="testMissingApp">
68+
<target name="missing-app">
6969
<symfony-cmd cmd="hello:world"/>
7070
</target>
7171

0 commit comments

Comments
 (0)