Skip to content

Commit 9d2d1f3

Browse files
committed
Adjusted code to work with latest phpunit 9
1 parent 1ffa1e1 commit 9d2d1f3

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

tests/Publiux/laravelcdn/AssetTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testInitReturningAssetObject()
3737
]);
3838

3939
// check the returned object is of type Publiux\laravelcdn\Asset
40-
assertEquals($result, $this->asset);
40+
$this->assertEquals($result, $this->asset);
4141
}
4242

4343
public function testIncludedDirectories()
@@ -52,7 +52,7 @@ public function testIncludedDirectories()
5252

5353
$result = $this->asset->getIncludedDirectories();
5454

55-
assertEquals($result, $dir);
55+
$this->assertEquals($result, $dir);
5656
}
5757

5858
public function testIncludedExtensions()
@@ -67,7 +67,7 @@ public function testIncludedExtensions()
6767

6868
$result = $this->asset->getIncludedExtensions();
6969

70-
assertEquals($result, $ext);
70+
$this->assertEquals($result, $ext);
7171
}
7272

7373
public function testIncludedPatterns()
@@ -82,7 +82,7 @@ public function testIncludedPatterns()
8282

8383
$result = $this->asset->getIncludedPatterns();
8484

85-
assertEquals($result, $pat);
85+
$this->assertEquals($result, $pat);
8686
}
8787

8888
public function testExcludedDirectories()
@@ -97,7 +97,7 @@ public function testExcludedDirectories()
9797

9898
$result = $this->asset->getExcludedDirectories();
9999

100-
assertEquals($result, $dir);
100+
$this->assertEquals($result, $dir);
101101
}
102102

103103
public function testExcludedFiles()
@@ -112,7 +112,7 @@ public function testExcludedFiles()
112112

113113
$result = $this->asset->getExcludedFiles();
114114

115-
assertEquals($result, $dir);
115+
$this->assertEquals($result, $dir);
116116
}
117117

118118
public function testExcludedExtensions()
@@ -127,7 +127,7 @@ public function testExcludedExtensions()
127127

128128
$result = $this->asset->getExcludedExtensions();
129129

130-
assertEquals($result, $dir);
130+
$this->assertEquals($result, $dir);
131131
}
132132

133133
public function testExcludedPatterns()
@@ -142,7 +142,7 @@ public function testExcludedPatterns()
142142

143143
$result = $this->asset->getExcludedPatterns();
144144

145-
assertEquals($result, $dir);
145+
$this->assertEquals($result, $dir);
146146
}
147147

148148
public function testExcludedHidden()
@@ -157,6 +157,6 @@ public function testExcludedHidden()
157157

158158
$result = $this->asset->getExcludeHidden();
159159

160-
assertEquals($result, $bol);
160+
$this->assertEquals($result, $bol);
161161
}
162162
}

tests/Publiux/laravelcdn/CdnFacadeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testAssetIsCallingUrlGenerator()
8787

8888
$result = $this->facade->asset($this->asset_path);
8989
// assert is calling the url generator
90-
assertEquals($result, $this->asset_url);
90+
$this->assertEquals($result, $this->asset_url);
9191
}
9292

9393
public function testPathIsCallingUrlGenerator()
@@ -98,7 +98,7 @@ public function testPathIsCallingUrlGenerator()
9898

9999
$result = $this->facade->asset($this->path_path);
100100
// assert is calling the url generator
101-
assertEquals($result, $this->asset_url);
101+
$this->assertEquals($result, $this->asset_url);
102102
}
103103

104104
/**

tests/Publiux/laravelcdn/CdnTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testPushCommandReturnTrue()
6969

7070
$result = $this->cdn->push();
7171

72-
assertEquals($result, true);
72+
$this->assertEquals($result, true);
7373
}
7474

7575
/**
@@ -153,7 +153,7 @@ public function testPushCommand()
153153
->andReturn(__DIR__.'/AwsS3ProviderTest.php');
154154

155155
// partial mock
156-
$p_aws_s3_provider = M::mock('\Publiux\laravelcdn\Providers\AwsS3Provider[connect]',
156+
$p_aws_s3_provider = M::mock('\Publiux\laravelcdn\Providers\AwsS3Provider[connect]',
157157
[
158158
$m_console,
159159
$m_validator,
@@ -185,6 +185,6 @@ public function testPushCommand()
185185

186186
$result = $cdn->push();
187187

188-
assertEquals($result, true);
188+
$this->assertEquals($result, true);
189189
}
190190
}

tests/Publiux/laravelcdn/FinderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ public function testReadReturnCorrectDataType()
4343

4444
$result = $finder->read($asset_holder);
4545

46-
assertInstanceOf('Symfony\Component\Finder\SplFileInfo', $result->first());
46+
$this->assertInstanceOf('Symfony\Component\Finder\SplFileInfo', $result->first());
4747

48-
assertEquals($result, new Collection($result->all()));
48+
$this->assertEquals($result, new Collection($result->all()));
4949
}
5050

5151
/**

tests/Publiux/laravelcdn/ProviderFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testCreateReturnCorrectProviderObject()
4141

4242
$provider = $this->provider_factory->create($configurations);
4343

44-
assertEquals($provider, $m_aws_s3);
44+
$this->assertEquals($provider, $m_aws_s3);
4545
}
4646

4747
/**

tests/Publiux/laravelcdn/Providers/AwsS3ProviderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testInitializingObject()
9595

9696
$awsS3Provider_obj = $this->p_awsS3Provider->init($configurations);
9797

98-
assertInstanceOf('Publiux\laravelcdn\Providers\AwsS3Provider', $awsS3Provider_obj);
98+
$this->assertInstanceOf('Publiux\laravelcdn\Providers\AwsS3Provider', $awsS3Provider_obj);
9999
}
100100

101101
public function testUploadingAssets()
@@ -131,7 +131,7 @@ public function testUploadingAssets()
131131

132132
$result = $this->p_awsS3Provider->upload(new Collection([$this->m_spl_file]));
133133

134-
assertEquals(true, $result);
134+
$this->assertEquals(true, $result);
135135
}
136136

137137
public function testUrlGenerator()
@@ -167,7 +167,7 @@ public function testUrlGenerator()
167167

168168
$result = $this->p_awsS3Provider->urlGenerator($this->path);
169169

170-
assertEquals($this->cdn_url, $result);
170+
$this->assertEquals($this->cdn_url, $result);
171171
}
172172

173173
public function testEmptyUrlGenerator()
@@ -203,6 +203,6 @@ public function testEmptyUrlGenerator()
203203

204204
$result = $this->p_awsS3Provider->urlGenerator($this->path);
205205

206-
assertEquals($this->path_url, $result);
206+
$this->assertEquals($this->path_url, $result);
207207
}
208208
}

0 commit comments

Comments
 (0)