*/ protected array $fixtures = [ 'plugin.CakeAccounting.DeExternalAccountStatements', ]; /** * setUp method * * @return void */ protected function setUp(): void { parent::setUp(); // $this->enableCsrfToken(); // $this->enableSecurityToken(); $this->disableErrorHandlerMiddleware(); $config = $this->getTableLocator()->exists('DeExternalAccountStatements') ? [] : ['className' => DeExternalAccountStatementsTable::class]; $this->DeExternalAccountStatements = $this->getTableLocator()->get('DeExternalAccountStatements', $config); } /** * tearDown method * * @return void */ protected function tearDown(): void { unset($this->DeExternalAccountStatements); parent::tearDown(); } /** * Test index method * * Tests the index action with a logged in user * * @return void * @throws Exception * * @uses DeExternalAccountStatementsController::index */ public function testIndexGetLoggedIn(): void { //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccountStatements', '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 DeExternalAccountStatementsController::view */ public function testViewGetLoggedIn(): void { $id = '2f83162b-2bec-4826-8853-fbda2fac3a95'; //$this->loginUserByRole('admin'); $url = [ 'plugin' => 'CakeAccounting', 'controller' => 'DeExternalAccountStatements', 'action' => 'view', $id, ]; $this->get($url); $this->assertResponseCode(200); } }