This PR adds unit tests for the OkkazeoCrawler.php class in the src/Services directory. The tests cover each public method of the class and use PHPUnit's assertion methods to verify the output against expected results. Mock objects are used to isolate the unit of code being tested.
Summary of Changes
Added a new directory tests in the root of the project.
Created a new file OkkazeoCrawlerTest.php in the tests directory.
Added a new class OkkazeoCrawlerTest in OkkazeoCrawlerTest.php that extends PHPUnit's TestCase class.
Added test methods for each public method of the OkkazeoCrawler class.
Used PHPUnit's assertion methods to verify the output of the OkkazeoCrawler methods against expected results.
Created mock objects for the dependencies of OkkazeoCrawler (HttpClientInterface, LoggerInterface, EntityManagerInterface, and KernelInterface) using PHPUnit's MockBuilder.
Added a new script in composer.json to run the tests using PHPUnit.
Updated the composer.json file to include the new script in the scripts section.
Please review and merge this PR to add unit tests for the OkkazeoCrawler.php class.
Fixes #8.
To checkout this PR branch, run the following command in your terminal:
Description
This PR adds unit tests for the
OkkazeoCrawler.php
class in thesrc/Services
directory. The tests cover each public method of the class and use PHPUnit's assertion methods to verify the output against expected results. Mock objects are used to isolate the unit of code being tested.Summary of Changes
tests
in the root of the project.OkkazeoCrawlerTest.php
in thetests
directory.OkkazeoCrawlerTest
inOkkazeoCrawlerTest.php
that extends PHPUnit'sTestCase
class.OkkazeoCrawler
class.OkkazeoCrawler
methods against expected results.OkkazeoCrawler
(HttpClientInterface, LoggerInterface, EntityManagerInterface, and KernelInterface) using PHPUnit'sMockBuilder
.composer.json
to run the tests using PHPUnit.composer.json
file to include the new script in thescripts
section.Please review and merge this PR to add unit tests for the
OkkazeoCrawler.php
class.Fixes #8.
To checkout this PR branch, run the following command in your terminal: