protected function setUp()
 {
     $seliton = new Seliton('http://dev-1.myseliton.com/api/v1/', static::getAccessToken());
     $this->_attribute = $seliton->attribute();
     // Remove existing test attributes
     list($attributes) = $this->_attribute->all(array('nameContains' => 'Test'));
     foreach ($attributes as $attribute) {
         $attribute->delete();
     }
 }
 protected function setUp()
 {
     $seliton = new Seliton('http://dev-1.myseliton.com/api/v1/', static::getAccessToken());
     $this->product = $seliton->product();
     // Remove existing test products
     list($products) = $this->product->all(array('nameContains' => 'Test'));
     foreach ($products as $product) {
         $product->delete();
     }
 }
 protected function setUp()
 {
     $seliton = new Seliton('http://dev-1.myseliton.com/api/v1/', static::getAccessToken());
     $this->customer = $seliton->customer();
     // Remove existing test customers
     list($customers) = $this->customer->all(array('emailContains' => 'test'));
     foreach ($customers as $customer) {
         $customer->delete();
     }
 }
 public function testFactoryAll()
 {
     $seliton = new Seliton('http://dev-1.myseliton.com/api/v1/', static::getAccessToken());
     // Remove existing test pages
     list($pagesBefore) = $seliton->page()->all(array('titleContains' => 'Test'));
     foreach ($pagesBefore as $pageBefore) {
         $pageBefore->delete();
     }
     for ($i = 1; $i <= 3; $i++) {
         $seliton->page()->create(array('pageTitle' => array('en' => "Test")));
     }
     list(, $count) = $seliton->page()->all(array('titleContains' => 'Test'));
     $this->assertEquals(3, $count);
 }
 protected function setUp()
 {
     $seliton = new Seliton('http://dev-1.myseliton.com/api/v1/', static::getAccessToken());
     $this->order = $seliton->order();
 }