*/ protected array $fixtures = [ 'plugin.CakeAccounting.DeAccountStatements', ]; /** * setUp method * * @return void */ protected function setUp(): void { parent::setUp(); // $this->enableCsrfToken(); // $this->enableSecurityToken(); $this->disableErrorHandlerMiddleware(); $config = $this->getTableLocator()->exists('DeAccountStatements') ? [] : ['className' => DeAccountStatementsTable::class]; $this->DeAccountStatements = $this->getTableLocator()->get('DeAccountStatements', $config); } /** * tearDown method * * @return void */ protected function tearDown(): void { unset($this->DeAccountStatements); parent::tearDown(); } /** * Test index method * * Tests the index action with a logged in user * * @return void * @throws Exception * * @uses DeAccountStatementsController::index */ public function testIndexGetLoggedIn(): void { //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountStatements', 'action' => 'index', ]; $this->get($url); $this->assertResponseCode(200); } /** * Test view method * * Tests the view action with a logged in user * * @return void * @throws Exception * * @uses DeAccountStatementsController::view */ public function testViewGetLoggedIn(): void { $id = '4614401e-fe0c-45cf-9f17-c45c7848960e'; //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeAccountStatements', 'action' => 'view', $id, ]; $this->get($url); $this->assertResponseCode(200); } }