title: Why does my PHPUnit Fixtures Stack test is not working properly?
body: <p>I've been reading <a href="https://phpunit.de/manual/current/en/fixtures.html" rel="nofollow">this</a> manual, but I'm not understanding why the $stack loose the values after each test function.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>require_once BASE . 'Transaction.php';
  
  class TransactionTest extends PHPUnit_Framework_TestCase
  {
      protected $stack;
  
      protected function setUp()
      {
          Database::getInstance()-&gt;connect();
          $this-&gt;stack = new Transaction(123456789);
      }
  
      public function testInsert()
      {
          $data['name'] = 'Omega';
          $this-&gt;stack-&gt;set($data);
          $this-&gt;assertTrue($this-&gt;stack-&gt;save());
      }
  
      public function testUpdate()
      {
          $object = PHPUnitReflectionClass::getInstance($this-&gt;stack);
          $this-&gt;assertEquals(array('name' , 'Omega'), $object-&gt;getProperty('name'));
      }
  }
  </code></pre>
  
  <p>At the "testUpdate" function, I don't have the name.</p>
  
  <p>If I just copy all the PHPUnit example, all tests will run perfectly, but I'm not able to see the values using var_dump at the next function. And this is another thing that I don't get it.</p>