From b1a4f29c56facb2f51c72f23a5906974e7292feb Mon Sep 17 00:00:00 2001 From: Andrew M Date: Sat, 11 Jan 2014 16:34:48 +0200 Subject: [PATCH] Fix typos in cookbook/testing/database --- cookbook/testing/database.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cookbook/testing/database.rst b/cookbook/testing/database.rst index 6d290b733df..ab869fa3a62 100644 --- a/cookbook/testing/database.rst +++ b/cookbook/testing/database.rst @@ -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(); } @@ -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