Skip to content

Commit 1fc424c

Browse files
committed
loadFixtures calls with ::class
1 parent ec5ba33 commit 1fc424c

File tree

6 files changed

+20
-28
lines changed

6 files changed

+20
-28
lines changed

Tests/Command/ExecuteCommandTest.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ExecuteCommandTest extends WebTestCase
1818
*/
1919
public function testExecute()
2020
{
21-
//DataFixtures create 4 records
21+
// DataFixtures create 4 records
2222
$this->loadFixtures([LoadScheduledCommandData::class]);
2323

2424
$output = $this->runCommand('scheduler:execute', [], true)->getDisplay();
@@ -38,12 +38,8 @@ public function testExecute()
3838
*/
3939
public function testExecuteWithNoOutput()
4040
{
41-
//DataFixtures create 4 records
42-
$this->loadFixtures(
43-
[
44-
'JMose\CommandSchedulerBundle\Fixtures\ORM\LoadScheduledCommandData',
45-
]
46-
);
41+
// DataFixtures create 4 records
42+
$this->loadFixtures([LoadScheduledCommandData::class]);
4743

4844
$output = $this->runCommand(
4945
'scheduler:execute',
@@ -64,12 +60,8 @@ public function testExecuteWithNoOutput()
6460
*/
6561
public function testExecuteWithDump()
6662
{
67-
//DataFixtures create 4 records
68-
$this->loadFixtures(
69-
[
70-
'JMose\CommandSchedulerBundle\Fixtures\ORM\LoadScheduledCommandData',
71-
]
72-
);
63+
// DataFixtures create 4 records
64+
$this->loadFixtures([LoadScheduledCommandData::class]);
7365

7466
$output = $this->runCommand(
7567
'scheduler:execute',

Tests/Command/MonitorCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setUp(): void
3535
*/
3636
public function testExecuteWithError()
3737
{
38-
//DataFixtures create 4 records
38+
// DataFixtures create 4 records
3939
$this->loadFixtures([LoadScheduledCommandData::class]);
4040

4141
// One command is locked in fixture (2), another have a -1 return code as lastReturn (4)
@@ -50,7 +50,7 @@ public function testExecuteWithError()
5050
*/
5151
public function testExecuteWithoutError()
5252
{
53-
//DataFixtures create 4 records
53+
// DataFixtures create 4 records
5454
$this->loadFixtures([LoadScheduledCommandData::class]);
5555

5656
$two = $this->em->getRepository('JMoseCommandSchedulerBundle:ScheduledCommand')->find(2);

Tests/Command/StartStopSchedulerCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class StartStopSchedulerCommandTest extends WebTestCase
1919
*/
2020
public function testStartAndStopScheduler()
2121
{
22-
//DataFixtures create 4 records
22+
// DataFixtures create 4 records
2323
$this->loadFixtures([LoadScheduledCommandData::class]);
2424

2525
$pidFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.StartSchedulerCommand::PID_FILE;

Tests/Command/UnlockCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function setUp(): void
3636
*/
3737
public function testUnlockAll()
3838
{
39-
//DataFixtures create 4 records
39+
// DataFixtures create 4 records
4040
$this->loadFixtures([LoadScheduledCommandData::class]);
4141

4242
// One command is locked in fixture (2), another have a -1 return code as lastReturn (4)
@@ -57,7 +57,7 @@ public function testUnlockAll()
5757
*/
5858
public function testUnlockByName()
5959
{
60-
//DataFixtures create 4 records
60+
// DataFixtures create 4 records
6161
$this->loadFixtures([LoadScheduledCommandData::class]);
6262

6363
// One command is locked in fixture (2), another have a -1 return code as lastReturn (4)
@@ -76,7 +76,7 @@ public function testUnlockByName()
7676
*/
7777
public function testUnlockByNameWithTimout()
7878
{
79-
//DataFixtures create 4 records
79+
// DataFixtures create 4 records
8080
$this->loadFixtures([LoadScheduledCommandData::class]);
8181

8282
// One command is locked in fixture with last execution two days ago (2), another have a -1 return code as lastReturn (4)

Tests/Controller/DetailControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testInitNewScheduledCommand()
3131
public function testInitEditScheduledCommand()
3232
{
3333
$client = parent::createClient();
34-
//DataFixtures create 4 records
34+
// DataFixtures create 4 records
3535
$this->loadFixtures([LoadScheduledCommandData::class]);
3636

3737
$crawler = $client->request('GET', '/command-scheduler/detail/edit/1');
@@ -88,7 +88,7 @@ public function testEditSave()
8888
{
8989
$client = parent::createClient();
9090

91-
//DataFixtures create 4 records
91+
// DataFixtures create 4 records
9292
$this->loadFixtures([LoadScheduledCommandData::class]);
9393

9494
$client->followRedirects(true);

Tests/Controller/ListControllerTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function setUp(): void
4040
*/
4141
public function testIndex()
4242
{
43-
//DataFixtures create 4 records
43+
// DataFixtures create 4 records
4444
$this->loadFixtures([LoadScheduledCommandData::class]);
4545

4646
$crawler = $this->client->request('GET', '/command-scheduler/list');
@@ -52,7 +52,7 @@ public function testIndex()
5252
*/
5353
public function testRemove()
5454
{
55-
//DataFixtures create 4 records
55+
// DataFixtures create 4 records
5656
$this->loadFixtures([LoadScheduledCommandData::class]);
5757

5858
$this->client->followRedirects(true);
@@ -67,7 +67,7 @@ public function testRemove()
6767
*/
6868
public function testToggle()
6969
{
70-
//DataFixtures create 4 records
70+
// DataFixtures create 4 records
7171
$this->loadFixtures([LoadScheduledCommandData::class]);
7272

7373
$this->client->followRedirects(true);
@@ -86,7 +86,7 @@ public function testToggle()
8686
*/
8787
public function testExecute()
8888
{
89-
//DataFixtures create 4 records
89+
// DataFixtures create 4 records
9090
$this->loadFixtures([LoadScheduledCommandData::class]);
9191

9292
$this->client->followRedirects(true);
@@ -101,7 +101,7 @@ public function testExecute()
101101
*/
102102
public function testUnlock()
103103
{
104-
//DataFixtures create 4 records
104+
// DataFixtures create 4 records
105105
$this->loadFixtures([LoadScheduledCommandData::class]);
106106

107107
$this->client->followRedirects(true);
@@ -119,7 +119,7 @@ public function testUnlock()
119119
*/
120120
public function testMonitorWithErrors()
121121
{
122-
//DataFixtures create 4 records
122+
// DataFixtures create 4 records
123123
$this->loadFixtures([LoadScheduledCommandData::class]);
124124

125125
$this->client->followRedirects(true);
@@ -138,7 +138,7 @@ public function testMonitorWithErrors()
138138
*/
139139
public function testMonitorWithoutErrors()
140140
{
141-
//DataFixtures create 4 records
141+
// DataFixtures create 4 records
142142
$this->loadFixtures([LoadScheduledCommandData::class]);
143143

144144
$two = $this->em->getRepository('JMoseCommandSchedulerBundle:ScheduledCommand')->find(2);

0 commit comments

Comments
 (0)