title: Distinguish between NULL and FALSE with PHPUnit
body: <p>Does anyone know a reliable way to distinguish between FALSE and NULL with PHPUnit?</p>
  
  <p>I'm trying to distinguish from NULL and FALSE in return values in my assertions. </p>
  
  <p>This fails:</p>
  
  <pre><code>$this-&gt;assertNotEquals(FALSE, NULL);
  </code></pre>
  
  <p>And these assertions pass:</p>
  
  <pre><code>$this-&gt;assertFalse(NULL);
  $this-&gt;assertNull(FALSE);
  </code></pre>
  
  <p>Edit: For some context, this is to distinguish between an error state (FALSE) versus an empty result (NULL). To ensure the function is returning properly, I need to distinguish between the two. 
  Thanks</p>
  
  <p>Edit...
  As per some of the problems regarding what I am testing, I'm adding the tests.</p>
  
  <pre><code>Class testNullFalse extends PHPUnit_Framework_TestCase{
  
  
      public function test_null_not_false (){
        $this-&gt;assertNotEquals(FALSE, NULL, "False and null are not the same");
      }
  
      public function test_null_is_false (){
        $this-&gt;assertFalse(NULL, "Null is clearly not FALSE");
      }
  
      public function test_false_is_null (){
        $this-&gt;assertNull(FALSE, "False is clearly not NULL");
      }
  
      public function test_false_equals_null(){
        $this-&gt;assertEquals(FALSE, NULL, "False and null are not equal");
      }
  
      public function test_false_sameas_null(){
        $this-&gt;assertSame(FALSE, NULL, "False and null are not the same");
      }
  
      public function test_false_not_sameas_null(){
        $this-&gt;assertNotSame(FALSE, NULL, "False and null are not the same");
      }
  }
  </code></pre>
  
  <p>And the results. </p>
  
  <pre><code>PHPUnit 3.5.10 by Sebastian Bergmann.
  
  FFF.F.
  
  Time: 0 seconds, Memory: 5.50Mb
  
  There were 4 failures:
  
  1) testNullFalse::test_null_not_false
  False and null are not the same
  Failed asserting that &lt;null&gt; is not equal to &lt;boolean:false&gt;.
  
  2) testNullFalse::test_null_is_false
  Null is clearly not FALSE
  Failed asserting that &lt;null&gt; is false.
  
  3) testNullFalse::test_false_is_null
  False is clearly not NULL
  Failed asserting that &lt;boolean:false&gt; is null.
  
  4) testNullFalse::test_false_sameas_null
  False and null are not the same
  &lt;null&gt; does not match expected type "boolean".
  
  FAILURES!
  Tests: 6, Assertions: 6, Failures: 4.
  </code></pre>