-
Notifications
You must be signed in to change notification settings - Fork 11
/
TabTest.php
69 lines (62 loc) · 2.08 KB
/
TabTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
*
* ..::..
* ..::::::::::::..
* ::'''''':''::'''''::
* ::.. ..: : ....::
* :::: ::: : : ::
* :::: ::: : ''' ::
* ::::..:::..::.....::
* ''::::::::::::''
* ''::''
*
*
* NOTICE OF LICENSE
*
* This source file is subject to the Creative Commons License.
* It is available through the world-wide-web at this URL:
* http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
* If you are unable to obtain it through the world-wide-web, please send an email
* to support@postcodeservice.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please contact support@postcodeservice.com for more information.
*
* @copyright Copyright (c) Total Internet Group B.V. https://tig.nl/copyright
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US
*/
namespace TIG\Postcode\Test\Unit\Block\Adminhtml\Config\Support;
use TIG\Postcode\Block\Adminhtml\Config\Support\Tab;
use TIG\Postcode\Config\Provider\ModuleConfiguration;
use TIG\Postcode\Test\TestCase;
class TabTest extends TestCase
{
protected $instanceClass = Tab::class;
public function testGetVersionNumber()
{
$instance = $this->getInstance();
$this->assertSame('1.4.1', $instance->getVersionNumber());
}
public function testGetSupportedMagentoVersions()
{
$instance = $this->getInstance([
'moduleConfiguration' => $this->getConfigurationMock()
]);
$this->assertSame('2.3.7, 2.4.3', $instance->getSupportedMagentoVersions());
}
/**+
* @return \PHPUnit_Framework_MockObject_MockObject
*/
private function getConfigurationMock()
{
$mock = $this->getFakeMock(ModuleConfiguration::class)->getMock();
$mockExpects = $mock->expects($this->once());
$mockExpects->method('getSupportedMagentoVersions');
$mockExpects->willReturn('2.3.7, 2.4.3');
return $mock;
}
}