September 2016
Intermediate to advanced
1091 pages
21h 41m
English
The Sales module is far more robust than any of the previous modules. There are several things we can unit test. However, we won't be covering full unit testing as part of this chapter. We will simply turn our attention to a single unit test, the one for the CustomerOrders service.
We start off by adding the following line under the testsuites element of our phpunit.xml.dist file:
<directory>src/Foggyline/SalesBundle/Tests</directory>
With that in place, running the phpunit command from the root of our shop should pick up any test we have defined under the src/Foggyline/SalesBundle/Tests/ directory.
Now, let's go ahead and create a test for our CustomerOrders service. We do so by defining the src/Foggyline/SalesBundle/Tests/Service/CustomerOrdersTest.php ...
Read now
Unlock full access