Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/ResourceTest.php
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | class ResourceTest extends TestCase | ||||
* Test creating a resource | * Test creating a resource | ||||
*/ | */ | ||||
public function testCreate(): void | public function testCreate(): void | ||||
{ | { | ||||
Queue::fake(); | Queue::fake(); | ||||
$resource = new Resource(); | $resource = new Resource(); | ||||
$resource->name = 'Reśo'; | $resource->name = 'Reśo'; | ||||
$resource->domain = 'kolabnow.com'; | $resource->domainName = 'kolabnow.com'; | ||||
$resource->save(); | $resource->save(); | ||||
$this->assertMatchesRegularExpression('/^[0-9]{1,20}$/', $resource->id); | $this->assertMatchesRegularExpression('/^[0-9]{1,20}$/', $resource->id); | ||||
$this->assertMatchesRegularExpression('/^resource-[0-9]{1,20}@kolabnow\.com$/', $resource->email); | $this->assertMatchesRegularExpression('/^resource-[0-9]{1,20}@kolabnow\.com$/', $resource->email); | ||||
$this->assertSame('Reśo', $resource->name); | $this->assertSame('Reśo', $resource->name); | ||||
$this->assertTrue($resource->isNew()); | $this->assertTrue($resource->isNew()); | ||||
$this->assertTrue($resource->isActive()); | $this->assertTrue($resource->isActive()); | ||||
$this->assertFalse($resource->isDeleted()); | $this->assertFalse($resource->isDeleted()); | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |