opencart-module/tests/admin/ModelRetailcrmEventAdminTest.php
Akolzin Dmitry a48ef3e1ea 'bugfixes'
2020-02-19 21:51:17 +03:00

28 lines
729 B
PHP

<?php
require_once __DIR__ . '/../' . getenv('TEST_SUITE') . '/TestCase.php';
class ModelRetailcrmEventAdminTest extends TestCase
{
const CODE = 'test';
public function setUp()
{
parent::setUp();
$eventModel = $this->loadModel('extension/event');
$eventModel->addEvent(self::CODE, 'test', 'test');
}
public function testGetEvent()
{
$eventModel = $this->loadModel('extension/retailcrm/event');
$event = $eventModel->getEventByCode(self::CODE);
$this->assertNotEmpty($event);
$this->assertEquals(self::CODE, $event['code']);
$this->assertEquals('test', $event['trigger']);
$this->assertEquals('test', $event['action']);
}
}