We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
2 | |||
3 | namespace Backpack\CRUD\Tests\Unit\CrudPanel; |
||
4 | |||
5 | use Backpack\CRUD\Tests\config\CrudPanel\BaseCrudPanel; |
||
6 | |||
7 | /** |
||
8 | * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\Operations |
||
9 | */ |
||
10 | class CrudPanelOperationsTest extends BaseCrudPanel |
||
11 | { |
||
12 | public function testItCanSetAndGetTheCurrentOperation() |
||
13 | { |
||
14 | $this->crudPanel->setOperation('create'); |
||
15 | $operation = $this->crudPanel->getOperation(); |
||
16 | $this->assertEquals('create', $operation); |
||
17 | } |
||
18 | |||
19 | public function testItCanConfigureOperations() |
||
20 | { |
||
21 | $this->crudPanel->operation(['create', 'update'], function () { |
||
0 ignored issues
–
show
|
|||
22 | $this->crudPanel->addField(['name' => 'test', 'type' => 'text']); |
||
23 | }); |
||
24 | $this->crudPanel->applyConfigurationFromSettings('create'); |
||
25 | |||
26 | $this->assertEquals(count($this->crudPanel->fields()), 1); |
||
27 | } |
||
28 | } |
||
29 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.