<?php

use FactoryGirl\Factory as FactoryGirl;

class ServiceTest extends DbTestCase
{

  public function testAbortAllServicesInArray()
  {
    $services = array(
      FactoryGirl::create('Service', array(), 'ibernated'),
      FactoryGirl::create('Service', array(), 'ibernated'),
    );

    Service::model()->abortAll($services);

    foreach ($services as $service)
      $this->assertEquals(Service::STATUS_ABORTED, $service->status);
  }




}
