1 | <?php |
||
17 | class TestMarkerModel extends TestCase { |
||
18 | |||
19 | /** |
||
20 | * @var Marker_Model |
||
21 | */ |
||
22 | private $_model; |
||
23 | |||
24 | public function setUp() { |
||
25 | $this->_model = new Marker_Model(array( |
||
26 | 'marker' => $this->_mock(array( |
||
27 | 'label' => new \stdClass(), |
||
28 | 'location' => new \stdClass(), |
||
29 | 'info_window' => new \stdClass() |
||
30 | )), |
||
31 | )); |
||
32 | parent::setUp(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @covers ::__construct |
||
37 | * @covers ::has_marker |
||
38 | */ |
||
39 | public function testHasMarker() { |
||
40 | $this->assertTrue($this->_model->has_marker()); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @covers ::__call |
||
45 | */ |
||
46 | public function testMagicCall() { |
||
47 | $this->assertEquals('bar', $this->_model->foo()); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @covers ::label |
||
52 | */ |
||
53 | public function testLabel() { |
||
54 | $this->assertInstanceOf(Marker_Label::class, $this->_model->label()); |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @covers ::location |
||
59 | */ |
||
60 | public function testLocation() { |
||
61 | $this->assertInstanceOf(Location::class, $this->_model->location()); |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @covers ::info_window |
||
66 | */ |
||
67 | public function testInfoWindow() { |
||
68 | $this->assertInstanceOf(Info_Window::class, $this->_model->info_window()); |
||
69 | } |
||
70 | } |