Skip to content

Commit

Permalink
Remove phpunit 5.3 references
Browse files Browse the repository at this point in the history
  • Loading branch information
alamirault committed Jun 18, 2023
1 parent eec7f40 commit a167521
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a167521

Please sign in to comment.