title: How to use PHPUnit to test a method that calls other methods of the same class, but returns no value
body: <p>How do you write a unit test for a method that calls other methods of the same class, but doesn't return a value? (Let's say with PHPUnit.)</p>
  
  <p>For example, let's say that I have the following class:</p>
  
  <pre><code>class MyClass {
  
      public function doEverything() {
  
          $this-&gt;doA();
          $this-&gt;doB();
          $this-&gt;doC();
  
      }
  
      public function doA() {
          // do something, return nothing
      }
  
      public function doB() {
          // do something, return nothing
      }
  
      public function doC() {
          // do something, return nothing
      }
  
  }
  </code></pre>
  
  <p>How would you test <code>doEverything()</code>?</p>
  
  <p>EDIT:</p>
  
  <p>I'm asking this because from what I've read it seems like pretty much every method should have its own dedicated <em>unit</em> test. Of course, you also have functional and integration tests, but those target specific routines, so to speak (not on a per method level necessarily).</p>
  
  <p>But if pretty much every method needs its own <em>unit</em> test, I'm thinking it would be "best practice" to unit test all of the above methods. Yes/no?</p>