Skip to content

Commit 45dd118

Browse files
committed
Fixes after the first review
1 parent 19c816d commit 45dd118

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

testing/database.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ Now, enable it as a PHPUnit extension (PHPUnit 8 or higher) or a listener
5151
5252
<!-- Add this in PHPUnit 8 or higher -->
5353
<extensions>
54-
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
54+
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension"/>
5555
</extensions>
5656
5757
<!-- Add this in PHPUnit 7 or lower -->
5858
<listeners>
59-
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
59+
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener"/>
6060
</listeners>
6161
</phpunit>
6262
@@ -100,7 +100,7 @@ Customize the new class to load ``Product`` objects into Doctrine::
100100
public function load(ObjectManager $manager)
101101
{
102102
$product = new Product();
103-
$product->setName('Priceless widget!');
103+
$product->setName('Priceless widget');
104104
$product->setPrice(14.50);
105105
$product->setDescription('Ok, I guess it *does* have a price');
106106
$manager->persist($product);
@@ -230,14 +230,14 @@ so, get the entity manager via the service container as follows::
230230
->getManager();
231231
}
232232

233-
public function testSearchByCategoryName()
233+
public function testSearchByName()
234234
{
235-
$products = $this->entityManager
235+
$product = $this->entityManager
236236
->getRepository(Product::class)
237-
->searchByCategoryName('foo')
237+
->findOneBy(['name' => 'Priceless widget'])
238238
;
239239

240-
$this->assertCount(1, $products);
240+
$this->assertSame(14.50, $product->getPrice());
241241
}
242242

243243
protected function tearDown()
@@ -250,6 +250,5 @@ so, get the entity manager via the service container as follows::
250250
}
251251
}
252252

253-
.. _`DoctrineTestBundle`: https://github.com/dmaicher/doctrine-test-bundle
254253
.. _`DAMADoctrineTestBundle`: https://github.com/dmaicher/doctrine-test-bundle
255254
.. _`DoctrineFixturesBundle documentation`: https://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html

0 commit comments

Comments
 (0)