@@ -67,11 +67,11 @@ protected function tearDown(): void
67
67
68
68
public function testConstructorWithArgs (): void
69
69
{
70
- $ licenseIdentifiers = $ this ->createStub (LicenseIdentifiers::class);
71
- $ spdxLicenses = $ this ->createStub (SpdxLicenses::class);
70
+ $ licenseIdentifiers = $ this ->createMock (LicenseIdentifiers::class);
71
+ $ spdxLicenses = $ this ->createMock (SpdxLicenses::class);
72
72
$ factory = new LicenseFactory ($ licenseIdentifiers , $ spdxLicenses );
73
- self ::assertSame ($ licenseIdentifiers , $ factory ->getLicenseIdentifiers () );
74
- self ::assertSame ($ spdxLicenses , $ factory ->getSpdxLicenses () );
73
+ self ::assertSame ($ licenseIdentifiers , $ factory ->licenseIdentifiers );
74
+ self ::assertSame ($ spdxLicenses , $ factory ->spdxLicenses );
75
75
}
76
76
77
77
public function testMakeNamedLicense (): void
@@ -163,7 +163,7 @@ public function testMakeExpressionInvalidArgumentThrows(): void
163
163
public function testMakeDisjunctiveSpdxLicense (): void
164
164
{
165
165
$ license = uniqid ('license ' , true );
166
- $ expected = $ this ->createStub (SpdxLicense::class);
166
+ $ expected = $ this ->createMock (SpdxLicense::class);
167
167
$ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' ]);
168
168
$ factory ->method ('makeSpdxLicense ' )
169
169
->with ($ license )->willReturn ($ expected );
@@ -174,7 +174,7 @@ public function testMakeDisjunctiveSpdxLicense(): void
174
174
public function testMakeDisjunctiveNamedLicense (): void
175
175
{
176
176
$ license = uniqid ('license ' , true );
177
- $ expected = $ this ->createStub (NamedLicense::class);
177
+ $ expected = $ this ->createMock (NamedLicense::class);
178
178
$ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeNamedLicense ' ]);
179
179
$ factory ->method ('makeSpdxLicense ' )
180
180
->with ($ license )->willThrowException (new DomainException ());
@@ -191,7 +191,7 @@ public function testMakeDisjunctiveNamedLicense(): void
191
191
public function testMakeFromStringSpdxLicense (): void
192
192
{
193
193
$ license = uniqid ('license ' , true );
194
- $ expected = $ this ->createStub (SpdxLicense::class);
194
+ $ expected = $ this ->createMock (SpdxLicense::class);
195
195
$ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' ]);
196
196
$ factory ->method ('makeSpdxLicense ' )
197
197
->with ($ license )->willReturn ($ expected );
@@ -202,7 +202,7 @@ public function testMakeFromStringSpdxLicense(): void
202
202
public function testMakeFromStringLicenseExpression (): void
203
203
{
204
204
$ license = uniqid ('license ' , true );
205
- $ expected = $ this ->createStub (LicenseExpression::class);
205
+ $ expected = $ this ->createMock (LicenseExpression::class);
206
206
$ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeExpression ' ]);
207
207
$ factory ->method ('makeSpdxLicense ' )
208
208
->with ($ license )->willThrowException (new DomainException ());
@@ -215,7 +215,7 @@ public function testMakeFromStringLicenseExpression(): void
215
215
public function testMakeFromStringNamedLicense (): void
216
216
{
217
217
$ license = uniqid ('license ' , true );
218
- $ expected = $ this ->createStub (NamedLicense::class);
218
+ $ expected = $ this ->createMock (NamedLicense::class);
219
219
$ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeExpression ' , 'makeNamedLicense ' ]);
220
220
$ factory ->method ('makeSpdxLicense ' )
221
221
->with ($ license )->willThrowException (new DomainException ());
0 commit comments