77
88namespace Deployer ;
99
10+ use joy \JoyTest ;
1011use PHPUnit \Framework \Attributes \Depends ;
1112use Symfony \Component \Console \Output \Output ;
1213
13- class DeployTest extends AbstractTest
14+ class DeployTest extends JoyTest
1415{
1516 public const RECIPE = __DIR__ . '/recipe/deploy.php ' ;
1617
1718 public function testDeploy ()
1819 {
19- $ display = $ this ->dep (self ::RECIPE , 'deploy ' );
20+ $ this ->depFile (self ::RECIPE , 'deploy ' );
2021
2122 $ display = $ this ->tester ->getDisplay ();
2223 self ::assertEquals (0 , $ this ->tester ->getStatusCode (), $ display );
@@ -56,17 +57,17 @@ public function testDeploySelectHosts()
5657 public function testKeepReleases ()
5758 {
5859 for ($ i = 0 ; $ i < 3 ; $ i ++) {
59- $ this ->dep (self ::RECIPE , 'deploy ' );
60+ $ this ->depFile (self ::RECIPE , 'deploy ' );
6061 self ::assertEquals (0 , $ this ->tester ->getStatusCode (), $ this ->tester ->getDisplay ());
6162 }
6263
6364 for ($ i = 0 ; $ i < 6 ; $ i ++) {
64- $ this ->dep (self ::RECIPE , 'deploy:fail ' );
65+ $ this ->depFile (self ::RECIPE , 'deploy:fail ' );
6566 self ::assertEquals (1 , $ this ->tester ->getStatusCode (), $ this ->tester ->getDisplay ());
6667 }
6768
6869 for ($ i = 0 ; $ i < 3 ; $ i ++) {
69- $ this ->dep (self ::RECIPE , 'deploy ' );
70+ $ this ->depFile (self ::RECIPE , 'deploy ' );
7071 self ::assertEquals (0 , $ this ->tester ->getStatusCode (), $ this ->tester ->getDisplay ());
7172 }
7273
@@ -80,7 +81,7 @@ public function testKeepReleases()
8081 #[Depends('testKeepReleases ' )]
8182 public function testRollback ()
8283 {
83- $ this ->dep (self ::RECIPE , 'rollback ' );
84+ $ this ->depFile (self ::RECIPE , 'rollback ' );
8485
8586 self ::assertEquals (0 , $ this ->tester ->getStatusCode (), $ this ->tester ->getDisplay ());
8687
@@ -93,7 +94,7 @@ public function testRollback()
9394
9495 public function testFail ()
9596 {
96- $ this ->dep (self ::RECIPE , 'deploy:fail ' );
97+ $ this ->depFile (self ::RECIPE , 'deploy:fail ' );
9798
9899 $ display = $ this ->tester ->getDisplay ();
99100 self ::assertEquals (1 , $ this ->tester ->getStatusCode (), $ display );
@@ -108,7 +109,7 @@ public function testFail()
108109 #[Depends('testFail ' )]
109110 public function testCleanup ()
110111 {
111- $ this ->dep (self ::RECIPE , 'deploy:cleanup ' );
112+ $ this ->depFile (self ::RECIPE , 'deploy:cleanup ' );
112113
113114 self ::assertEquals (0 , $ this ->tester ->getStatusCode (), $ this ->tester ->getDisplay ());
114115
@@ -121,8 +122,8 @@ public function testCleanup()
121122
122123 public function testIsUnlockedExitsWithOneWhenDeployIsLocked ()
123124 {
124- $ this ->dep (self ::RECIPE , 'deploy:lock ' );
125- $ this ->dep (self ::RECIPE , 'deploy:is_locked ' );
125+ $ this ->depFile (self ::RECIPE , 'deploy:lock ' );
126+ $ this ->depFile (self ::RECIPE , 'deploy:is_locked ' );
126127 $ display = $ this ->tester ->getDisplay ();
127128
128129 self ::assertStringContainsString ('Deploy is locked by ' , $ display );
@@ -131,8 +132,8 @@ public function testIsUnlockedExitsWithOneWhenDeployIsLocked()
131132
132133 public function testIsUnlockedExitsWithZeroWhenDeployIsNotLocked ()
133134 {
134- $ this ->dep (self ::RECIPE , 'deploy:unlock ' );
135- $ this ->dep (self ::RECIPE , 'deploy:is_locked ' );
135+ $ this ->depFile (self ::RECIPE , 'deploy:unlock ' );
136+ $ this ->depFile (self ::RECIPE , 'deploy:is_locked ' );
136137 $ display = $ this ->tester ->getDisplay ();
137138
138139 self ::assertStringContainsString ('Deploy is unlocked. ' , $ display );
0 commit comments