11<?php
2- require_once dirname (dirname (dirname (dirname (__FILE__ )))) . '/bootstrap.php ' ;
2+
3+ namespace ZendServerTest \DepH \Deployment ;
34
45use \ZendServer \DepH \Deployment \Deployment ;
6+ use PHPUnit_Framework_TestCase as TestCase ;
57
68/**
79 * Deployment test case.
810 */
9- class DeploymentTest extends PHPUnit_Framework_TestCase
11+ class DeploymentTest extends TestCase
1012{
1113
1214 /**
@@ -21,7 +23,7 @@ class DeploymentTest extends PHPUnit_Framework_TestCase
2123 protected function setUp ()
2224 {
2325 parent ::setUp ();
24-
26+
2527 $ this ->Deployment = new Deployment ();
2628 }
2729
@@ -31,35 +33,28 @@ protected function setUp()
3133 protected function tearDown ()
3234 {
3335 $ this ->Deployment = null ;
34-
35- parent ::tearDown ();
36- }
3736
38- /**
39- * Constructs the test case.
40- */
41- public function __construct ()
42- {
37+ parent ::tearDown ();
4338 }
4439
4540 /**
4641 * Tests Deployment->getCurrentAction()
47- *
48- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
42+ *
43+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
4944 */
5045 public function testGetCurrentActionException ()
5146 {
5247 $ this ->Deployment ->getCurrentAction ();
5348 }
54-
49+
5550 /**
5651 * Tests Deployment->getCurrentAction()
5752 */
5853 public function testGetCurrentAction ()
5954 {
6055 $ methodToCall = 'getCurrentAction ' ;
6156 $ actual = require '_files/pre_activate.php ' ;
62-
57+
6358 $ this ->assertEquals (\ZendServer \DepH \Deployment \Deployment::PRE_ACTIVATE , $ actual );
6459 }
6560
@@ -70,14 +65,14 @@ public function testGetCurrentActionScript()
7065 {
7166 $ methodToCall = 'getCurrentActionScript ' ;
7267 $ actual = require '_files/pre_activate.php ' ;
73-
68+
7469 $ this ->assertEquals ('pre_activate.php ' , $ actual );
7570 }
76-
71+
7772 /**
7873 * Tests Deployment->getCurrentActionScript()
79- *
80- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
74+ *
75+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
8176 */
8277 public function testGetCurrentActionScriptException ()
8378 {
@@ -91,18 +86,18 @@ public function testIsPreStageAction()
9186 {
9287 $ methodToCall = 'isPreStageAction ' ;
9388 $ actual = require '_files/pre_activate.php ' ;
94-
89+
9590 $ this ->assertFalse ($ actual );
96-
91+
9792 $ actual = require '_files/pre_stage.php ' ;
98-
93+
9994 $ this ->assertTrue ($ actual );
10095 }
101-
96+
10297 /**
10398 * Tests Deployment->isPreStageAction()
104- *
105- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
99+ *
100+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
106101 */
107102 public function testIsPreStageActionException ()
108103 {
@@ -116,18 +111,18 @@ public function testIsPostStageAction()
116111 {
117112 $ methodToCall = 'isPostStageAction ' ;
118113 $ actual = require '_files/pre_activate.php ' ;
119-
114+
120115 $ this ->assertFalse ($ actual );
121-
116+
122117 $ actual = require '_files/post_stage.php ' ;
123-
118+
124119 $ this ->assertTrue ($ actual );
125120 }
126-
121+
127122 /**
128123 * Tests Deployment->isPostStageAction()
129- *
130- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
124+ *
125+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
131126 */
132127 public function testIsPostStageActionException ()
133128 {
@@ -141,18 +136,18 @@ public function testIsPreActivateAction()
141136 {
142137 $ methodToCall = 'isPreActivateAction ' ;
143138 $ actual = require '_files/pre_activate.php ' ;
144-
139+
145140 $ this ->assertTrue ($ actual );
146-
141+
147142 $ actual = require '_files/post_stage.php ' ;
148-
143+
149144 $ this ->assertFalse ($ actual );
150145 }
151-
146+
152147 /**
153148 * Tests Deployment->isPreActivateAction()
154- *
155- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
149+ *
150+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
156151 */
157152 public function testIsPreActivateActionException ()
158153 {
@@ -166,18 +161,18 @@ public function testIsPostActivateAction()
166161 {
167162 $ methodToCall = 'isPostActivateAction ' ;
168163 $ actual = require '_files/pre_activate.php ' ;
169-
164+
170165 $ this ->assertFalse ($ actual );
171-
166+
172167 $ actual = require '_files/post_activate.php ' ;
173-
168+
174169 $ this ->assertTrue ($ actual );
175170 }
176-
171+
177172 /**
178173 * Tests Deployment->isPostActivateAction()
179- *
180- * @expectedException ZendServer\DepH\Deployment\Exception\RuntimeException
174+ *
175+ * @expectedException \ ZendServer\DepH\Deployment\Exception\RuntimeException
181176 */
182177 public function testIsPostActivateActionException ()
183178 {
0 commit comments