Skip to content

Commit

Permalink
Closes #5310
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jul 19, 2024
1 parent 283b04a commit fb692a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
41 changes: 0 additions & 41 deletions src/Framework/MockObject/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function array_merge;
use function assert;
use function debug_backtrace;
use PHPUnit\Event\Facade as EventFacade;
use PHPUnit\Framework\InvalidArgumentException;
use PHPUnit\Framework\MockObject\Generator\ClassIsEnumerationException;
use PHPUnit\Framework\MockObject\Generator\ClassIsFinalException;
Expand Down Expand Up @@ -233,46 +232,6 @@ public function enableOriginalClone(): self
return $this;
}

/**
* Disables the use of class autoloading while creating the mock object.
*
* @return $this
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5309
*
* @codeCoverageIgnore
*/
public function disableAutoload(): self
{
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
$this->testCase->valueObjectForEvents(),
'MockBuilder::disableAutoload() is deprecated and will be removed in PHPUnit 12 without replacement.',
);

$this->autoload = false;

return $this;
}

/**
* Enables the use of class autoloading while creating the mock object.
*
* @return $this
*
* @deprecated https://github.com/sebastianbergmann/phpunit/issues/5309
*/
public function enableAutoload(): self
{
EventFacade::emitter()->testTriggeredPhpunitDeprecation(
$this->testCase->valueObjectForEvents(),
'MockBuilder::enableAutoload() is deprecated and will be removed in PHPUnit 12 without replacement.',
);

$this->autoload = true;

return $this;
}

/**
* @return $this
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/Framework/MockObject/Creation/MockBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ public function testDefaultBehaviourCanBeConfiguredExplicitly(): void
$double = $this->getMockBuilder(ExtendableClass::class)
->enableOriginalConstructor()
->enableOriginalClone()
->enableAutoload()
->enableArgumentCloning()
->enableAutoReturnValueGeneration()
->getMock();

Expand Down

0 comments on commit fb692a7

Please sign in to comment.