Skip to content

Commit 9c0e0d9

Browse files
oliverkleeSam Tuke
authored andcommitted
[TASK] Use static:: instead of self:: (#47)
This will allow for subclasses to overwrite methods and constants and hence is the current recommended practice.
1 parent 9cd5ba3 commit 9c0e0d9

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Tests/Integration/Composer/ScriptsTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ScriptsTest extends TestCase
1717
*/
1818
public function webDirectoryHasBeenCreated()
1919
{
20-
self::assertDirectoryExists($this->getAbsoluteWebDirectoryPath());
20+
static::assertDirectoryExists($this->getAbsoluteWebDirectoryPath());
2121
}
2222

2323
/**
@@ -48,15 +48,15 @@ public function webDirectoryFilesDataProvider(): array
4848
*/
4949
public function webDirectoryFilesExist(string $fileName)
5050
{
51-
self::assertFileExists($this->getAbsoluteWebDirectoryPath() . $fileName);
51+
static::assertFileExists($this->getAbsoluteWebDirectoryPath() . $fileName);
5252
}
5353

5454
/**
5555
* @test
5656
*/
5757
public function binariesDirectoryHasBeenCreated()
5858
{
59-
self::assertDirectoryExists($this->getAbsoluteBinariesDirectoryPath());
59+
static::assertDirectoryExists($this->getAbsoluteBinariesDirectoryPath());
6060
}
6161

6262
/**
@@ -84,7 +84,7 @@ public function binariesDataProvider(): array
8484
*/
8585
public function binariesExist(string $fileName)
8686
{
87-
self::assertFileExists($this->getAbsoluteBinariesDirectoryPath() . $fileName);
87+
static::assertFileExists($this->getAbsoluteBinariesDirectoryPath() . $fileName);
8888
}
8989

9090
/**
@@ -100,7 +100,7 @@ private function getBundleConfigurationFilePath(): string
100100
*/
101101
public function bundleConfigurationFileExists()
102102
{
103-
self::assertFileExists($this->getBundleConfigurationFilePath());
103+
static::assertFileExists($this->getBundleConfigurationFilePath());
104104
}
105105

106106
/**
@@ -122,7 +122,7 @@ public function bundleConfigurationFileContainsModuleBundles(string $bundleClass
122122
{
123123
$fileContents = file_get_contents($this->getBundleConfigurationFilePath());
124124

125-
self::assertContains($bundleClassName, $fileContents);
125+
static::assertContains($bundleClassName, $fileContents);
126126
}
127127

128128
/**
@@ -138,22 +138,22 @@ private function getModuleRoutesConfigurationFilePath(): string
138138
*/
139139
public function moduleRoutesConfigurationFileExists()
140140
{
141-
self::assertFileExists($this->getModuleRoutesConfigurationFilePath());
141+
static::assertFileExists($this->getModuleRoutesConfigurationFilePath());
142142
}
143143

144144
/**
145145
* @test
146146
*/
147147
public function parametersConfigurationFileExists()
148148
{
149-
self::assertFileExists(dirname(__DIR__, 3) . '/Configuration/parameters.yml');
149+
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/parameters.yml');
150150
}
151151

152152
/**
153153
* @test
154154
*/
155155
public function modulesConfigurationFileExists()
156156
{
157-
self::assertFileExists(dirname(__DIR__, 3) . '/Configuration/config_modules.yml');
157+
static::assertFileExists(dirname(__DIR__, 3) . '/Configuration/config_modules.yml');
158158
}
159159
}

Tests/System/ApplicationBundle/PhpListApplicationBundleTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function homepageReturnsSuccess(string $environment)
5353

5454
$response = $this->httpClient->get('/', ['base_uri' => $this->getBaseUrl()]);
5555

56-
self::assertSame(200, $response->getStatusCode());
56+
static::assertSame(200, $response->getStatusCode());
5757
}
5858

5959
/**
@@ -67,6 +67,6 @@ public function homepageReturnsContent(string $environment)
6767

6868
$response = $this->httpClient->get('/', ['base_uri' => $this->getBaseUrl()]);
6969

70-
self::assertNotEmpty($response->getBody()->getContents());
70+
static::assertNotEmpty($response->getBody()->getContents());
7171
}
7272
}

0 commit comments

Comments
 (0)