@@ 44-53 (lines=10) @@ | ||
41 | /** |
|
42 | * |
|
43 | */ |
|
44 | public function testCanEdit() |
|
45 | { |
|
46 | $object = $this->objFromFixture(LocationCategory::class, 'service'); |
|
47 | ||
48 | $admin = $this->objFromFixture(Member::class, 'locationedit'); |
|
49 | $this->assertTrue($object->canEdit($admin)); |
|
50 | ||
51 | $member = $this->objFromFixture(Member::class, 'default'); |
|
52 | $this->assertFalse($object->canEdit($member)); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * |
|
@@ 58-67 (lines=10) @@ | ||
55 | /** |
|
56 | * |
|
57 | */ |
|
58 | public function testCanDelete() |
|
59 | { |
|
60 | $object = $this->objFromFixture(LocationCategory::class, 'service'); |
|
61 | ||
62 | $admin = $this->objFromFixture(Member::class, 'locationdelete'); |
|
63 | $this->assertTrue($object->canDelete($admin)); |
|
64 | ||
65 | $member = $this->objFromFixture(Member::class, 'default'); |
|
66 | $this->assertFalse($object->canDelete($member)); |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * |
|
@@ 72-81 (lines=10) @@ | ||
69 | /** |
|
70 | * |
|
71 | */ |
|
72 | public function testCanCreate() |
|
73 | { |
|
74 | $object = $this->objFromFixture(LocationCategory::class, 'service'); |
|
75 | ||
76 | $admin = $this->objFromFixture(Member::class, 'locationcreate'); |
|
77 | $this->assertTrue($object->canCreate($admin)); |
|
78 | ||
79 | $member = $this->objFromFixture(Member::class, 'default'); |
|
80 | $this->assertFalse($object->canCreate($member)); |
|
81 | } |
|
82 | } |
|
83 |