Code Duplication    Length = 8-8 lines in 7 locations

install/Helper/Accounting.php 1 location

@@ 13-20 (lines=8) @@
10
        $this->db = $db;
11
    }
12
13
    public function createYearWithVatAndStandardAccounts()
14
    {
15
        require_once 'Intraface/modules/accounting/Year.php';
16
        $year = new Year($this->kernel);
17
        $year->save(array('from_date' => date('Y') . '-01-01', 'to_date' => date('Y') . '-12-31', 'label' => 'test', 'locked' => 0, 'vat' => 1));
18
        $year->createAccounts('standard');
19
        $year->setYear();
20
    }
21
}

tests/unit/Debtor/CreditNoteTest.php 1 location

@@ 72-79 (lines=8) @@
69
        return $creditnote;
70
    }
71
72
    function createAccountingYear()
73
    {
74
        require_once 'Intraface/modules/accounting/Year.php';
75
        $year = new Year($this->createKernel());
76
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0));
77
        $year->createAccounts('standard');
78
        return $year;
79
    }
80
81
    function createContact()
82
    {

tests/unit/Debtor/DepreciationTest.php 1 location

@@ 60-67 (lines=8) @@
57
        return $contact;
58
    }
59
60
    function createAccountingYear()
61
    {
62
        require_once 'Intraface/modules/accounting/Year.php';
63
        $year = new Year($this->createKernel());
64
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0));
65
        $year->createAccounts('standard');
66
        return $year;
67
    }
68
69
    function testConstruct()
70
    {

tests/unit/Debtor/InvoiceTest.php 1 location

@@ 74-81 (lines=8) @@
71
        return $invoice;
72
    }
73
74
    function createAccountingYear()
75
    {
76
        require_once 'Intraface/modules/accounting/Year.php';
77
        $year = new Year($this->createKernel());
78
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0));
79
        $year->createAccounts('standard');
80
        return $year;
81
    }
82
83
    function createContact()
84
    {

tests/unit/Debtor/PaymentTest.php 1 location

@@ 61-68 (lines=8) @@
58
        return $contact;
59
    }
60
61
    function createAccountingYear()
62
    {
63
        require_once 'Intraface/modules/accounting/Year.php';
64
        $year = new Year($this->createKernel());
65
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0));
66
        $year->createAccounts('standard');
67
        return $year;
68
    }
69
70
    function testConstruct()
71
    {

tests/unit/Debtor/ReminderTest.php 1 location

@@ 61-68 (lines=8) @@
58
        return $invoice_id;
59
    }
60
61
    function createAccountingYear()
62
    {
63
        require_once 'Intraface/modules/accounting/Year.php';
64
        $year = new Year($this->createKernel());
65
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0));
66
        $year->createAccounts('standard');
67
        return $year;
68
    }
69
70
    function testConstruct()
71
    {

tests/unit/Procurement/ProcurementTest.php 1 location

@@ 32-39 (lines=8) @@
29
        return $kernel;
30
    }
31
32
    function createAccountingYear()
33
    {
34
        require_once 'Intraface/modules/accounting/Year.php';
35
        $year = new Year($this->createKernel());
36
        $year->save(array('from_date' => date('Y').'-01-01', 'to_date' => date('Y').'-12-31', 'label' => 'test', 'locked' => 0, 'vat' => 1));
37
        $year->createAccounts('standard');
38
        return $year;
39
    }
40
41
    function testConstruct()
42
    {