Completed
Pull Request — master (#513)
by Helpful
04:05
created
tests/AbstractPipelineTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 
81 81
 		// Confirm the correct abort link is generated
82 82
 		$this->assertEquals($pipeline->Link('abort'),
83
-			'naut/project/Project 1/environment/env1/pipeline/'.$pipeline->ID.'/abort');
83
+			'naut/project/Project 1/environment/env1/pipeline/' . $pipeline->ID . '/abort');
84 84
 	}
85 85
 
86 86
 	public function testCanCancelPipeline() {
Please login to merge, or discard this patch.
tests/DNDataArchiveTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -120,25 +120,25 @@  discard block
 block discarded – undo
120 120
 
121 121
 	public function testValidateArchiveContentsAll() {
122 122
 		$archive = DNDataArchive::create();
123
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/all.sspak';
123
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/all.sspak';
124 124
 		$result = $archive->validateArchiveContents('all');
125 125
 		$this->assertTrue($result->valid());
126 126
 	}
127 127
 
128 128
 	public function testValidateArchiveContentsDB() {
129 129
 		$archive = DNDataArchive::create();
130
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/all.sspak';
130
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/all.sspak';
131 131
 		$result = $archive->validateArchiveContents('db');
132 132
 		$this->assertTrue($result->valid());
133 133
 
134
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/db.sspak';
134
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/db.sspak';
135 135
 		$result = $archive->validateArchiveContents('db');
136 136
 		$this->assertTrue($result->valid());
137 137
 	}
138 138
 
139 139
 	public function testValidateArchiveContentsDBFails() {
140 140
 		$archive = DNDataArchive::create();
141
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/assets.sspak';
141
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/assets.sspak';
142 142
 		$result = $archive->validateArchiveContents('db');
143 143
 		$this->assertFalse($result->valid());
144 144
 		$this->assertEquals('The snapshot is missing the database.', current($result->messageList()));
@@ -146,18 +146,18 @@  discard block
 block discarded – undo
146 146
 
147 147
 	public function testValidateArchiveContentsAssets() {
148 148
 		$archive = DNDataArchive::create();
149
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/all.sspak';
149
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/all.sspak';
150 150
 		$result = $archive->validateArchiveContents('assets');
151 151
 		$this->assertTrue($result->valid());
152 152
 
153
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/assets.sspak';
153
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/assets.sspak';
154 154
 		$result = $archive->validateArchiveContents('assets');
155 155
 		$this->assertTrue($result->valid());
156 156
 	}
157 157
 
158 158
 	public function testValidateArchiveContentsAssetsFails() {
159 159
 		$archive = DNDataArchive::create();
160
-		$archive->ArchiveFile()->Filename = __DIR__.'/sspaks/db.sspak';
160
+		$archive->ArchiveFile()->Filename = __DIR__ . '/sspaks/db.sspak';
161 161
 		$result = $archive->validateArchiveContents('assets');
162 162
 		$this->assertFalse($result->valid());
163 163
 		$this->assertEquals('The snapshot is missing assets.', current($result->messageList()));
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
 
166 166
 	public function testValidateArchiveContentsFileMissingFails() {
167 167
 		$archive = DNDataArchive::create();
168
-		$filename = __DIR__.'/sspaks/not.found.sspak';
168
+		$filename = __DIR__ . '/sspaks/not.found.sspak';
169 169
 		$archive->ArchiveFile()->Filename = $filename;
170 170
 		$result = $archive->validateArchiveContents('all');
171 171
 		$this->assertFalse($result->valid());
172
-		$this->assertEquals('SSPak file "'.$filename.'" cannot be read.', current($result->messageList()));
172
+		$this->assertEquals('SSPak file "' . $filename . '" cannot be read.', current($result->messageList()));
173 173
 	}
174 174
 }
Please login to merge, or discard this patch.
tests/DNEnvironmentTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 
162 162
 }
163 163
 
164
-class BackendTwo extends DemoDeploymentBackend implements TestOnly  {
164
+class BackendTwo extends DemoDeploymentBackend implements TestOnly {
165 165
 
166 166
 }
167 167
 
Please login to merge, or discard this patch.
tests/DNProjectTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function testOnBeforeWriteShouldNotCreateCapFolder() {
24 24
 		$this->assertTrue(file_exists($this->envPath));
25
-		$this->assertFalse(file_exists($this->envPath.'/testproject'));
25
+		$this->assertFalse(file_exists($this->envPath . '/testproject'));
26 26
 		$this->project->onBeforeWrite();
27
-		$this->assertFalse(file_exists($this->envPath.'/testproject'), 'Folder should not have been created');
27
+		$this->assertFalse(file_exists($this->envPath . '/testproject'), 'Folder should not have been created');
28 28
 	}
29 29
 
30 30
 	public function testOnBeforeWriteShouldCreateCapFolder() {
31 31
 		$this->assertTrue(file_exists($this->envPath));
32
-		$this->assertFalse(file_exists($this->envPath.'/testproject'));
32
+		$this->assertFalse(file_exists($this->envPath . '/testproject'));
33 33
 		$this->project->CreateEnvFolder = true;
34 34
 		$this->project->onBeforeWrite();
35
-		$this->assertTrue(file_exists($this->envPath.'/testproject'), 'Folder should have been created');
35
+		$this->assertTrue(file_exists($this->envPath . '/testproject'), 'Folder should have been created');
36 36
 	}
37 37
 
38 38
 	public function testSetCreateProjectFolderFieldNoFolderExists() {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 	public function testSetCreateProjectFolderFieldFolderExists() {
47 47
 		$this->assertFalse(
48
-			file_exists($this->envPath.'/'.$this->project->Name),
48
+			file_exists($this->envPath . '/' . $this->project->Name),
49 49
 			'project folder shouldnt exist prior to save'
50 50
 		);
51 51
 		$this->project->CreateEnvFolder = true;
Please login to merge, or discard this patch.
tests/DeploynautTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 			'DNData' => array(
21 21
 				'properties' => array(
22 22
 					'EnvironmentDir' => $this->envPath,
23
-					'KeyDir' => TEMP_FOLDER .'/deploynaut_test/gitkeys',
23
+					'KeyDir' => TEMP_FOLDER . '/deploynaut_test/gitkeys',
24 24
 					'DataTransferDir' => Director::baseFolder() . '/assets/transfers',
25 25
 					'GitUser' => ''
26 26
 				)
Please login to merge, or discard this patch.
tests/SimplePackageGeneratorTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 	public function setUp() {
12 12
 		// We muck with the filesystem, create one folder that contains all the stuff we create,
13 13
 		// and delete it entirely on tearDown()
14
-		$this->tempPath = TEMP_FOLDER . '/SimplePackageGeneratorTest-' . rand(1000000,9999999);
14
+		$this->tempPath = TEMP_FOLDER . '/SimplePackageGeneratorTest-' . rand(1000000, 9999999);
15 15
 		mkdir($this->tempPath);
16 16
 
17 17
 	}
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	public function testGeneratePackage() {
27 27
 		// Build some precursor state for the test
28
-		$gitPath = $this->tempPath .'/git-repo';
29
-		$packagePath = $this->tempPath .'/test.tar.gz';
28
+		$gitPath = $this->tempPath . '/git-repo';
29
+		$packagePath = $this->tempPath . '/test.tar.gz';
30 30
 		$sha = $this->createTempGitRepo($gitPath);
31 31
 		$this->assertNotEmpty($sha);
32 32
 
Please login to merge, or discard this patch.
tests/SizeRestrictedPackageCacheTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@
 block discarded – undo
13 13
 	public function setUp() {
14 14
 		// We muck with the filesystem, create one folder that contains all the stuff we create,
15 15
 		// and delete it entirely on tearDown()
16
-		$this->tempPath = TEMP_FOLDER . '/PackageCacheTest-' . rand(1000000,9999999);
16
+		$this->tempPath = TEMP_FOLDER . '/PackageCacheTest-' . rand(1000000, 9999999);
17 17
 		mkdir($this->tempPath);
18 18
 
19 19
 		$this->cache = new SizeRestrictedPackageCache;
20 20
 		$this->cache->setCacheSize(3);
21
-		mkdir($this->tempPath .'/cache');
22
-		$this->cache->setBaseDir($this->tempPath .'/cache');
21
+		mkdir($this->tempPath . '/cache');
22
+		$this->cache->setBaseDir($this->tempPath . '/cache');
23 23
 
24 24
 		$this->gen = new PackageCacheTest_MockGenerator;
25 25
 		// To do: refactor so as not to be pipelinetest-specific (see also SimplePackageGeneratorTest)
Please login to merge, or discard this patch.