Move beUser into Abstract class
This commit is contained in:
@@ -35,4 +35,15 @@ abstract class AbstractTestCase extends TestCase
|
|||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Becomes a user.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function beUser()
|
||||||
|
{
|
||||||
|
$this->user = factory('CachetHQ\Cachet\Models\User')->create();
|
||||||
|
$this->be($this->user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,10 +67,4 @@ class ComponentTest extends AbstractTestCase
|
|||||||
$this->get('/api/v1/components/1');
|
$this->get('/api/v1/components/1');
|
||||||
$this->seeJson(['name' => 'Foo']);
|
$this->seeJson(['name' => 'Foo']);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function beUser()
|
|
||||||
{
|
|
||||||
$this->user = factory('CachetHQ\Cachet\Models\User')->create();
|
|
||||||
$this->be($this->user);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user