Code Duplication    Length = 45-45 lines in 2 locations

Test/Unit/Block/Adminhtml/Order/View/Tab/ApiLogTest.php 1 location

@@ 32-76 (lines=45) @@
29
use Payone\Core\Block\Adminhtml\Order\View\Tab\ApiLog as ClassToTest;
30
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
31
32
class ApiLogTest extends \PHPUnit_Framework_TestCase
33
{
34
    /**
35
     * @var ClassToTest
36
     */
37
    private $classToTest;
38
39
    /**
40
     * @var ObjectManager
41
     */
42
    private $objectManager;
43
44
    protected function setUp()
45
    {
46
        $this->objectManager = new ObjectManager($this);
47
48
        $this->classToTest = $this->objectManager->getObject(ClassToTest::class);
49
    }
50
51
    public function testGetTabLabel()
52
    {
53
        $result = $this->classToTest->getTabLabel();
54
        $expected = 'PAYONE Protokoll - Api';
55
        $this->assertEquals($expected, $result);
56
    }
57
58
    public function testGetTabTitle()
59
    {
60
        $result = $this->classToTest->getTabTitle();
61
        $expected = 'PAYONE Protokoll - Api';
62
        $this->assertEquals($expected, $result);
63
    }
64
65
    public function testCanShowTab()
66
    {
67
        $result = $this->classToTest->canShowTab();
68
        $this->assertTrue($result);
69
    }
70
71
    public function testIsHidden()
72
    {
73
        $result = $this->classToTest->isHidden();
74
        $this->assertFalse($result);
75
    }
76
}
77

Test/Unit/Block/Adminhtml/Order/View/Tab/TransactionStatusTest.php 1 location

@@ 32-76 (lines=45) @@
29
use Payone\Core\Block\Adminhtml\Order\View\Tab\TransactionStatus as ClassToTest;
30
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
31
32
class TransactionStatusTest extends \PHPUnit_Framework_TestCase
33
{
34
    /**
35
     * @var ClassToTest
36
     */
37
    private $classToTest;
38
39
    /**
40
     * @var ObjectManager
41
     */
42
    private $objectManager;
43
44
    protected function setUp()
45
    {
46
        $this->objectManager = new ObjectManager($this);
47
48
        $this->classToTest = $this->objectManager->getObject(ClassToTest::class);
49
    }
50
51
    public function testGetTabLabel()
52
    {
53
        $result = $this->classToTest->getTabLabel();
54
        $expected = 'PAYONE Protokoll - Status';
55
        $this->assertEquals($expected, $result);
56
    }
57
58
    public function testGetTabTitle()
59
    {
60
        $result = $this->classToTest->getTabTitle();
61
        $expected = 'PAYONE Protokoll - Status';
62
        $this->assertEquals($expected, $result);
63
    }
64
65
    public function testCanShowTab()
66
    {
67
        $result = $this->classToTest->canShowTab();
68
        $this->assertTrue($result);
69
    }
70
71
    public function testIsHidden()
72
    {
73
        $result = $this->classToTest->isHidden();
74
        $this->assertFalse($result);
75
    }
76
}
77