title: Codeception: Cleaning test data from database
body: <p>I have been writing some unit tests with Codeception and my database has been getting over run with the test data. While reading the documentation I found it says:</p>
  
  <blockquote>
    <p>Database will be cleaned and populated after each test</p>
  </blockquote>
  
  <p>Does anybody know if there is anything in the yaml file or maybe something I need to put in the tear down method?</p>
  
  <p>Here is my test:</p>
  
  <pre><code>use Codeception\Util\Stub;
  
  class peopleAdminTest extends \Codeception\TestCase\Test
  {
     /**
      * @var \CodeGuy
      */
      protected $codeGuy;
  
      /**
       * @var the model object
       */
      private $_model;
  
      /**
       * @var some mock data
       */
      private $_data = array( "people" =&gt; array( "title" =&gt; "Unit Test Data" ) );
  
      protected function _before()
      {
          $this-&gt;_model = new People_model();
      }
  
      public function test_instantiation()
      {
          $this-&gt;assertInstanceOf( 'people_model', $this-&gt;_model );
      }
  
      public function test_save()
      {
          $this-&gt;_model-&gt;save( $this-&gt;_data[ 'people' ] );
          $this-&gt;codeGuy-&gt;seeInDatabase( 'pegisis_people', array( 'title' =&gt; 'Unit Test Data' ) );
      }
  }
  </code></pre>