Skip to content

Commit e30b2c9

Browse files
committed
Change TokenGeneratorTest::testInstantiation() to be more consistent with other tests.
1 parent a995570 commit e30b2c9

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

tests/unit/TokenGeneratorTest.php

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -91,32 +91,8 @@ final public function testInstantiateWithoutValidFor(): void
9191
*/
9292
final public function testInstantiation(): void
9393
{
94-
$mockConfig = $this->getMockBuilder(Config::class)
95-
->disableOriginalConstructor()
96-
->getMock()
97-
;
98-
99-
$mockInterval = $this->getMockBuilder(\DateInterval::class)
100-
->disableOriginalConstructor()
101-
->getMock()
102-
;
103-
104-
$mockKeys = $this->getMockBuilder(KeysInterface::class)
105-
->disableOriginalConstructor()
106-
->getMock()
107-
;
108-
109-
$mockConfig->expects($this->once())
110-
->method('getKeys')
111-
->willReturn($mockKeys)
112-
;
113-
114-
$mockKeys->expects($this->once())
115-
->method('getEncryptionKey')
116-
->willReturn('mock key')
117-
;
94+
$actual = $this->createTokenGenerator();
11895

119-
$actual = new TokenGenerator($mockConfig, $mockInterval);
12096
$expected = TokenGenerator::class;
12197

12298
$this->assertInstanceOf($expected, $actual);

0 commit comments

Comments
 (0)