Skip to content

Commit

Permalink
minor #18430 Remove PHPUnit 5.3 references (alamirault)
Browse files Browse the repository at this point in the history
This PR was merged into the 6.2 branch.

Discussion
----------

Remove PHPUnit 5.3 references

Symfony 6.0 require `php: >=8.0.2`, phpunit 5.3 require `php: ^5.6 || ^7.0`.

So they can't be used together, let's remove unnecessary documentation !

Commits
-------

a167521 Remove phpunit 5.3 references
  • Loading branch information
OskarStark committed Jun 19, 2023
2 parents 979d134 + a167521 commit c1645f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions create_framework/unit_testing.rst
Expand Up @@ -99,8 +99,6 @@ We are now ready to write our first test::
private function getFrameworkForException($exception)
{
$matcher = $this->createMock(Routing\Matcher\UrlMatcherInterface::class);
// use getMock() on PHPUnit 5.3 or below
// $matcher = $this->getMock(Routing\Matcher\UrlMatcherInterface::class);

$matcher
->expects($this->once())
Expand Down Expand Up @@ -159,8 +157,6 @@ Response::
public function testControllerResponse()
{
$matcher = $this->createMock(Routing\Matcher\UrlMatcherInterface::class);
// use getMock() on PHPUnit 5.3 or below
// $matcher = $this->getMock(Routing\Matcher\UrlMatcherInterface::class);

$matcher
->expects($this->once())
Expand Down
4 changes: 0 additions & 4 deletions testing/database.rst
Expand Up @@ -61,8 +61,6 @@ constructor, you can pass a mock object within a test::

// Now, mock the repository so it returns the mock of the employee
$employeeRepository = $this->createMock(ObjectRepository::class);
// use getMock() on PHPUnit 5.3 or below
// $employeeRepository = $this->getMock(ObjectRepository::class);
$employeeRepository->expects($this->any())
->method('find')
->willReturn($employee);
Expand All @@ -71,8 +69,6 @@ constructor, you can pass a mock object within a test::
// (this is not needed if the class being tested injects the
// repository it uses instead of the entire object manager)
$objectManager = $this->createMock(ObjectManager::class);
// use getMock() on PHPUnit 5.3 or below
// $objectManager = $this->getMock(ObjectManager::class);
$objectManager->expects($this->any())
->method('getRepository')
->willReturn($employeeRepository);
Expand Down

0 comments on commit c1645f4

Please sign in to comment.