Skip to content

Commit

Permalink
Fix CS/WS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 9, 2024
1 parent e5b3c30 commit ae39c2a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit/Framework/MockObject/Creation/MockBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\MockObject;

use PHPUnit\TestFixture\MockObject\ClassCallingMethodInConstructor;
use function assert;
use function class_exists;
use function interface_exists;
Expand All @@ -28,6 +27,7 @@
use PHPUnit\Framework\MockObject\Generator\NameAlreadyInUseException;
use PHPUnit\Framework\TestCase;
use PHPUnit\TestFixture\MockObject\AbstractClass;
use PHPUnit\TestFixture\MockObject\ClassCallingMethodInConstructor;
use PHPUnit\TestFixture\MockObject\ExtendableClass;
use PHPUnit\TestFixture\MockObject\InterfaceWithReturnTypeDeclaration;
use PHPUnit\TestFixture\MockObject\TraitWithConcreteAndAbstractMethod;
Expand Down Expand Up @@ -170,11 +170,12 @@ public function testCreatesMockObjectForUnknownType(): void
#[TestDox('onlyMethods() mocked methods can be called within the original constructor')]
public function testOnlyMethodCalledInConstructorWorks(): void
{
$testClassMock = $this->getMockBuilder(ClassCallingMethodInConstructor::class)
$double = $this->getMockBuilder(ClassCallingMethodInConstructor::class)
->onlyMethods(['reset'])
->getMock();

$testClassMock->expects($this::once())->method('reset');
$testClassMock->second();
$double->expects($this->once())->method('reset');

$double->second();
}
}

0 comments on commit ae39c2a

Please sign in to comment.