Skip to content

Remove horizontal scrollbar and other fixes #4909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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