Completed
Push — master ( 934849...10255c )
by Daryl
01:34
created

TestInfoWindowModel::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Clubdeuce\WPLib\Components\GoogleMaps\Tests\UnitTests;
4
5
use Clubdeuce\WPLib\Components\GoogleMaps\Info_Window_Model;
6
use Clubdeuce\WPLib\Components\GoogleMaps\Tests\TestCase;
7
8
/**
9
 * Class TestInfoWindowModel
10
 * @package            Clubdeuce\WPLib\Components\GoogleMaps\Tests\UnitTests
11
 * @coversDefaultClass Clubdeuce\WPLib\Components\GoogleMaps\Info_Window_Model
12
 * @group              InfoWindow
13
 */
14
class TestInfoWindowModel extends TestCase {
15
16
	/**
17
	 * @var Info_Window_Model
18
	 */
19
	private $_model;
20
21
	public function setUp() {
22
23
		$this->_model = new Info_Window_Model(array(
24
			'content'      => 'Lorem ipsum dolor est.',
25
			'pixel_offset' => 20,
26
			'position'    => array('lat' => 100.946382, 'lng' => -100.9473927),
27
			'max_width'    => 500,
28
29
		));
30
		parent::setUp();
31
32
	}
33
34
	/**
35
	 * @covers ::content
36
	 */
37
	public function testContent() {
38
39
		$this->assertEquals('Lorem ipsum dolor est.', $this->_model->content());
40
41
	}
42
43
	/**
44
	 * @covers ::pixel_offset
45
	 */
46
	public function testPixelOffset() {
47
48
		$this->assertEquals(20, $this->_model->pixel_offset());
49
50
	}
51
52
	/**
53
	 * @covers ::position
54
	 */
55
	public function testPosition() {
56
57
		$this->assertEquals(array('lat' => 100.946382, 'lng' => -100.9473927), $this->_model->position());
58
59
	}
60
61
	/**
62
	 * @covers ::max_width
63
	 */
64
	public function testMaxWidth() {
65
66
		$this->assertEquals(500, $this->_model->max_width());
67
68
	}
69
70
}
71