title: How should I test this behavior using PHPUnit in CakePHP 3.0 ?
body: <p>I have this method in BrandBehavior and I want to test it. </p>
  
  <pre><code>public function setCurrentBrandId(Entity $entity)
  {
      if (!isset($entity-&gt;brand_id) or empty($entity-&gt;brand_id)) {
          $entity-&gt;brand_id = $this-&gt;session-&gt;read("Brand.id");
      }
  }
  </code></pre>
  
  <p>I want to test if this method actually sets the BrandID. Could You give me the example how should I test this ? So far I have covered basically nothing.  </p>
  
  <pre><code>public function setUp()
  {
      parent::setUp();
      $this-&gt;Progress = new BrandsBehavior();
  }  
  public function testSetCurrentBrandId()
  {
  
  }
  </code></pre>
  
  <p>If you need anything else let me know and just so that you know that I am beginner with tests and testing.</p>