/**
  *
  */
 public function testBatchWrite_OnBeforeOnAfterCalled_ReturnsTrue()
 {
     $cat = new Cat();
     $cat->Name = 'Garfield';
     $cat->Country = 'Canada';
     $cat->HasClaws = true;
     $batch = new \Batch();
     $batch->write(array($cat));
     $this->assertTrue($cat->exists());
     $this->assertEquals(1, $cat->ID);
     $this->assertTrue($cat->getOnBeforeWriteCalled());
     $this->assertTrue($cat->getOnAfterWriteCalled());
     $this->assertEquals(1, Cat::get()->count());
 }