We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42c80d1 commit b1a4f29Copy full SHA for b1a4f29
cookbook/testing/database.rst
@@ -49,7 +49,7 @@ Suppose the class you want to test looks like this::
49
public function calculateTotalSalary($id)
50
{
51
$employeeRepository = $this->entityManager->getRepository('AcmeDemoBundle::Employee');
52
- $employee = $userRepository->find($id);
+ $employee = $employeeRepository->find($id);
53
54
return $employee->getSalary() + $employee->getBonus();
55
}
@@ -62,7 +62,6 @@ it's easy to pass a mock object within a test::
62
63
class SalaryCalculatorTest extends \PHPUnit_Framework_TestCase
64
65
-
66
public function testCalculateTotalSalary()
67
68
// First, mock the object to be used in the test
0 commit comments