@@ -67,11 +67,11 @@ protected function tearDown(): void
6767
6868 public function testConstructorWithArgs (): void
6969 {
70- $ licenseIdentifiers = $ this ->createStub (LicenseIdentifiers::class);
71- $ spdxLicenses = $ this ->createStub (SpdxLicenses::class);
70+ $ licenseIdentifiers = $ this ->createMock (LicenseIdentifiers::class);
71+ $ spdxLicenses = $ this ->createMock (SpdxLicenses::class);
7272 $ 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 );
7575 }
7676
7777 public function testMakeNamedLicense (): void
@@ -163,7 +163,7 @@ public function testMakeExpressionInvalidArgumentThrows(): void
163163 public function testMakeDisjunctiveSpdxLicense (): void
164164 {
165165 $ license = uniqid ('license ' , true );
166- $ expected = $ this ->createStub (SpdxLicense::class);
166+ $ expected = $ this ->createMock (SpdxLicense::class);
167167 $ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' ]);
168168 $ factory ->method ('makeSpdxLicense ' )
169169 ->with ($ license )->willReturn ($ expected );
@@ -174,7 +174,7 @@ public function testMakeDisjunctiveSpdxLicense(): void
174174 public function testMakeDisjunctiveNamedLicense (): void
175175 {
176176 $ license = uniqid ('license ' , true );
177- $ expected = $ this ->createStub (NamedLicense::class);
177+ $ expected = $ this ->createMock (NamedLicense::class);
178178 $ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeNamedLicense ' ]);
179179 $ factory ->method ('makeSpdxLicense ' )
180180 ->with ($ license )->willThrowException (new DomainException ());
@@ -191,7 +191,7 @@ public function testMakeDisjunctiveNamedLicense(): void
191191 public function testMakeFromStringSpdxLicense (): void
192192 {
193193 $ license = uniqid ('license ' , true );
194- $ expected = $ this ->createStub (SpdxLicense::class);
194+ $ expected = $ this ->createMock (SpdxLicense::class);
195195 $ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' ]);
196196 $ factory ->method ('makeSpdxLicense ' )
197197 ->with ($ license )->willReturn ($ expected );
@@ -202,7 +202,7 @@ public function testMakeFromStringSpdxLicense(): void
202202 public function testMakeFromStringLicenseExpression (): void
203203 {
204204 $ license = uniqid ('license ' , true );
205- $ expected = $ this ->createStub (LicenseExpression::class);
205+ $ expected = $ this ->createMock (LicenseExpression::class);
206206 $ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeExpression ' ]);
207207 $ factory ->method ('makeSpdxLicense ' )
208208 ->with ($ license )->willThrowException (new DomainException ());
@@ -215,7 +215,7 @@ public function testMakeFromStringLicenseExpression(): void
215215 public function testMakeFromStringNamedLicense (): void
216216 {
217217 $ license = uniqid ('license ' , true );
218- $ expected = $ this ->createStub (NamedLicense::class);
218+ $ expected = $ this ->createMock (NamedLicense::class);
219219 $ factory = $ this ->createPartialMock (LicenseFactory::class, ['makeSpdxLicense ' , 'makeExpression ' , 'makeNamedLicense ' ]);
220220 $ factory ->method ('makeSpdxLicense ' )
221221 ->with ($ license )->willThrowException (new DomainException ());
0 commit comments