Skip to content

Commit

Permalink
minor #4909 Remove horizontal scrollbar and other fixes (ifdattic)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Remove horizontal scrollbar and other fixes

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

Commits
-------

11422db Update using_components.rst
9c1c071 Update using_components.rst
2e5c054 Remove horizontal scrollbar, fix command with version
759ad10 Remove horizontal scrollbar
d47f5f7 Remove horizontal scrollbar
  • Loading branch information
weaverryan committed Mar 20, 2015
2 parents 51af15d + 11422db commit ac9ba97
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 2 additions & 7 deletions components/using_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ whatever component you want.
file in your directory. In that case, no worries! Just run
``php composer.phar require symfony/finder``.

If you know you need a specific version of the library, add that to the command:

.. code-block:: bash
$ composer require symfony/finder
**3.** Write your code!

Once Composer has downloaded the component(s), all you need to do is include
Expand All @@ -51,7 +45,8 @@ immediately::

// File example: src/script.php

// update this to the path to the "vendor/" directory, relative to this file
// update this to the path to the "vendor/"
// directory, relative to this file
require_once __DIR__.'/../vendor/autoload.php';

use Symfony\Component\Finder\Finder;
Expand Down
9 changes: 6 additions & 3 deletions cookbook/testing/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Suppose the class you want to test looks like this::

public function calculateTotalSalary($id)
{
$employeeRepository = $this->entityManager->getRepository('AppBundle::Employee');
$employeeRepository = $this->entityManager
->getRepository('AppBundle::Employee');
$employee = $employeeRepository->find($id);

return $employee->getSalary() + $employee->getBonus();
Expand All @@ -74,15 +75,17 @@ it's easy to pass a mock object within a test::
->will($this->returnValue(1100));

// Now, mock the repository so it returns the mock of the employee
$employeeRepository = $this->getMockBuilder('\Doctrine\ORM\EntityRepository')
$employeeRepository = $this
->getMockBuilder('\Doctrine\ORM\EntityRepository')
->disableOriginalConstructor()
->getMock();
$employeeRepository->expects($this->once())
->method('find')
->will($this->returnValue($employee));

// Last, mock the EntityManager to return the mock of the repository
$entityManager = $this->getMockBuilder('\Doctrine\Common\Persistence\ObjectManager')
$entityManager = $this
->getMockBuilder('\Doctrine\Common\Persistence\ObjectManager')
->disableOriginalConstructor()
->getMock();
$entityManager->expects($this->once())
Expand Down
3 changes: 2 additions & 1 deletion cookbook/testing/profiling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ the ``test`` environment)::
{
$client = static::createClient();

// Enable the profiler for the next request (it does nothing if the profiler is not available)
// Enable the profiler for the next request
// (it does nothing if the profiler is not available)
$client->enableProfiler();

$crawler = $client->request('GET', '/hello/Fabien');
Expand Down

0 comments on commit ac9ba97

Please sign in to comment.