Skip to content

Commit

Permalink
bug #3463 Fix typos in cookbook/testing/database (ifdattic)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Fix typos in cookbook/testing/database

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

b1a4f29 Fix typos in cookbook/testing/database
  • Loading branch information
weaverryan committed Jan 21, 2014
2 parents f9f7548 + b1a4f29 commit 89963cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cookbook/testing/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Suppose the class you want to test looks like this::
public function calculateTotalSalary($id)
{
$employeeRepository = $this->entityManager->getRepository('AcmeDemoBundle::Employee');
$employee = $userRepository->find($id);
$employee = $employeeRepository->find($id);

return $employee->getSalary() + $employee->getBonus();
}
Expand All @@ -62,7 +62,6 @@ it's easy to pass a mock object within a test::

class SalaryCalculatorTest extends \PHPUnit_Framework_TestCase
{

public function testCalculateTotalSalary()
{
// First, mock the object to be used in the test
Expand Down

0 comments on commit 89963cc

Please sign in to comment.