Test Failed
Push — master ( 1ea845...275c2e )
by Vítězslav
03:06
created

StitekTest::testCreateNew()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Test\FlexiPeeHP;
4
5
use FlexiPeeHP\Stitek;
6
7
/**
8
 * Generated by PHPUnit_SkeletonGenerator on 2016-04-27 at 17:32:11.
9
 */
10
class StitekTest extends FlexiBeeRWTest
11
{
12
    /**
13
     * @var Stitek
14
     */
15
    protected $object;
16
17
    /**
18
     * Sets up the fixture, for example, opens a network connection.
19
     * This method is called before a test is executed.
20
     */
21
    protected function setUp()
22
    {
23
        $this->object = new Stitek;
24
    }
25
26
    /**
27
     * Tears down the fixture, for example, closes a network connection.
28
     * This method is called after a test is executed.
29
     */
30
    protected function tearDown()
31
    {
32
        
33
    }
34
35
    /**
36
     * @covers FlexiPeeHP\Stitek::getLabels
37
     */
38
    public function testGetLabels()
39
    {
40
        $this->object->getLabels(new \FlexiPeeHP\Adresar());
41
    }
42
43
    /**
44
     * @covers FlexiPeeHP\Stitek::listToArray
45
     */
46
    public function testListToArray()
47
    {
48
        $this->assertEquals(['A' => 'A', 'B' => 'B'], Stitek::listToArray('A,B'));
49
    }
50
51
    /**
52
     * @covers FlexiPeeHP\Stitek::getAvailbleLabels
53
     */
54
    public function testGetAvailbleLabels()
55
    {
56
        $labels = \FlexiPeeHP\Stitek::getAvailbleLabels(new \FlexiPeeHP\FakturaVydana());
57
        $this->assertTrue(is_array($labels) && count($labels));
58
    }
59
60
    /**
61
     * @covers FlexiPeeHP\Stitek::setLabel
62
     * @todo   Implement testSetLabel().
63
     */
64
    public function testSetLabel()
65
    {
66
        // Remove the following lines when you implement this test.
67
        $this->markTestIncomplete(
68
            'This test has not been implemented yet.'
69
        );
70
    }
71
72
    /**
73
     * @covers FlexiPeeHP\Stitek::unsetLabel
74
     * @todo   Implement testUnsetLabel().
75
     */
76
    public function testUnsetLabel()
77
    {
78
        // Remove the following lines when you implement this test.
79
        $this->markTestIncomplete(
80
            'This test has not been implemented yet.'
81
        );
82
    }
83
84
    /**
85
     * @covers FlexiPeeHP\Stitek::createNew
86
     */
87
    public function testCreateNew()
88
    {
89
        $this->assertFalse($this->object->createNew('Without Invoice',
0 ignored issues
show
Bug introduced by
The method createNew() does not seem to exist on object<FlexiPeeHP\Stitek>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
90
                ['pokladna']));
91
92
        $testCode = \Ease\Sand::randomString();
93
94
        $this->assertTrue($this->object->createNew('Example Label',
0 ignored issues
show
Bug introduced by
The method createNew() does not seem to exist on object<FlexiPeeHP\Stitek>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
95
                ['faktura-vydana', 'faktura-prijata'], ['kod' => $testCode]));
96
97
        $this->object->deleteFromFlexiBee($this->object->getRecordIdent()); //Cleanup
98
    }
99
}
100