Completed
Push — master ( 40b8f9...e7d3a7 )
by Daryl
01:32
created
includes/class-map-model.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -118,16 +118,16 @@
 block discarded – undo
118 118
 
119 119
     }
120 120
 
121
-	/**
122
-	 * @return array
123
-	 */
124
-	function make_args() {
121
+    /**
122
+     * @return array
123
+     */
124
+    function make_args() {
125 125
 
126
-		return array(
127
-			'center' => $this->center(),
128
-			'zoom'   => (int)$this->zoom()
129
-		);
126
+        return array(
127
+            'center' => $this->center(),
128
+            'zoom'   => (int)$this->zoom()
129
+        );
130 130
 
131
-	}
131
+    }
132 132
 
133 133
 }
Please login to merge, or discard this patch.
tests/integration/testGoogleMaps.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,24 +14,24 @@
 block discarded – undo
14 14
  */
15 15
 class TestGoogleMaps extends TestCase {
16 16
 
17
-	/**
18
-	 * @covers ::_wp_enqueue_scripts_9
19
-	 */
20
-	function testScriptRegistered() {
21
-		$this->assertTrue(wp_script_is('google-maps', 'registered'));
22
-		$this->assertTrue(wp_script_is('map-control', 'registered'));
23
-	}
24
-
25
-	/**
26
-	 * @covers  ::_wp_enqueue_scripts_9
27
-	 * @depends testScriptRegistered
28
-	 */
29
-	function testScriptEnqueued() {
30
-
31
-		Google_Maps::register_script_condition(function(){return true;});
32
-
33
-		$this->assertTrue(wp_script_is('google-maps', 'enqueued'));
34
-		$this->assertTrue(wp_script_is('map-control', 'enqueued'));
35
-
36
-	}
17
+    /**
18
+     * @covers ::_wp_enqueue_scripts_9
19
+     */
20
+    function testScriptRegistered() {
21
+        $this->assertTrue(wp_script_is('google-maps', 'registered'));
22
+        $this->assertTrue(wp_script_is('map-control', 'registered'));
23
+    }
24
+
25
+    /**
26
+     * @covers  ::_wp_enqueue_scripts_9
27
+     * @depends testScriptRegistered
28
+     */
29
+    function testScriptEnqueued() {
30
+
31
+        Google_Maps::register_script_condition(function(){return true;});
32
+
33
+        $this->assertTrue(wp_script_is('google-maps', 'enqueued'));
34
+        $this->assertTrue(wp_script_is('map-control', 'enqueued'));
35
+
36
+    }
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
tests/includes/testCase.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -64,56 +64,56 @@
 block discarded – undo
64 64
         return $reflection->invoke( $class, $args );
65 65
     }
66 66
 
67
-	/**
68
-	 * @return string
69
-	 */
67
+    /**
68
+     * @return string
69
+     */
70 70
     protected function get_sample_response() {
71 71
 
72
-    	return file_get_contents( __DIR__ . '/geocoder-response.json' );
72
+        return file_get_contents( __DIR__ . '/geocoder-response.json' );
73 73
 
74 74
     }
75 75
 
76
-	/**
77
-	 * @return Mock
78
-	 */
76
+    /**
77
+     * @return Mock
78
+     */
79 79
     protected function getMockGeocoder() {
80 80
 
81
-	    /**
82
-	     * @var Mock $geocoder
83
-	     */
84
-    	$geocoder = \Mockery::mock('\Clubdeuce\WPLib\Components\GoogleMaps\Geocoder');
85
-	    $geocoder->shouldReceive('geocode')->andReturn($this->getMockLocation());
81
+        /**
82
+         * @var Mock $geocoder
83
+         */
84
+        $geocoder = \Mockery::mock('\Clubdeuce\WPLib\Components\GoogleMaps\Geocoder');
85
+        $geocoder->shouldReceive('geocode')->andReturn($this->getMockLocation());
86 86
 
87
-	    return $geocoder;
87
+        return $geocoder;
88 88
     }
89 89
 
90
-	/**
91
-	 * @return Mock
92
-	 */
90
+    /**
91
+     * @return Mock
92
+     */
93 93
     protected function getMockLocation() {
94
-	    /**
95
-	     * @var Mock $location
96
-	     */
97
-    	$location = \Mockery::mock('\Clubdeuce\WPLib\Components\GoogleMape\Location');
98
-	    $location->shouldReceive('address')->andReturn('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA');
99
-	    $location->shouldReceive('formatted_address')->andReturn('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA');
100
-	    $location->shouldReceive('state')->andReturn('CA');
101
-	    $location->shouldReceive('zip_code')->andReturn('94043');
102
-	    $location->shouldReceive('latitude')->andReturn(37.4224764);
103
-	    $location->shouldReceive('longitude')->andReturn(-122.0842499);
104
-	    $location->shouldReceive('place_id')->andReturn('ChIJ2eUgeAK6j4ARbn5u_wAGqWA');
105
-	    $location->shouldReceive('type')->andReturn('street_address');
106
-	    $location->shouldReceive('viewport')->andReturn(array(
107
-	    	'northeast' => array(
108
-			    'lat'   => 37.4238253802915,
109
-			    'lng'   => -122.0829009197085
110
-		    ),
111
-		    'sourhwest' => array(
112
-			    'lat'   => 37.4211274197085,
94
+        /**
95
+         * @var Mock $location
96
+         */
97
+        $location = \Mockery::mock('\Clubdeuce\WPLib\Components\GoogleMape\Location');
98
+        $location->shouldReceive('address')->andReturn('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA');
99
+        $location->shouldReceive('formatted_address')->andReturn('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA');
100
+        $location->shouldReceive('state')->andReturn('CA');
101
+        $location->shouldReceive('zip_code')->andReturn('94043');
102
+        $location->shouldReceive('latitude')->andReturn(37.4224764);
103
+        $location->shouldReceive('longitude')->andReturn(-122.0842499);
104
+        $location->shouldReceive('place_id')->andReturn('ChIJ2eUgeAK6j4ARbn5u_wAGqWA');
105
+        $location->shouldReceive('type')->andReturn('street_address');
106
+        $location->shouldReceive('viewport')->andReturn(array(
107
+            'northeast' => array(
108
+                'lat'   => 37.4238253802915,
109
+                'lng'   => -122.0829009197085
110
+            ),
111
+            'sourhwest' => array(
112
+                'lat'   => 37.4211274197085,
113 113
                 'lng'   => -122.0855988802915
114
-		    )
115
-	    ));
114
+            )
115
+        ));
116 116
 
117
-	    return $location;
117
+        return $location;
118 118
     }
119 119
 }
120 120
\ No newline at end of file
Please login to merge, or discard this patch.
tests/integration/testMarker.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -15,57 +15,57 @@
 block discarded – undo
15 15
  */
16 16
 class TestMarker extends TestCase {
17 17
 
18
-	/**
19
-	 * @var Marker
20
-	 */
21
-	private $_marker;
18
+    /**
19
+     * @var Marker
20
+     */
21
+    private $_marker;
22 22
 
23
-	public function setUp() {
24
-		$this->_marker = new Marker(array(
25
-			'address'  => '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA',
26
-			'title'    => 'Sample Location'
27
-		));
28
-		parent::setUp();
29
-	}
23
+    public function setUp() {
24
+        $this->_marker = new Marker(array(
25
+            'address'  => '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA',
26
+            'title'    => 'Sample Location'
27
+        ));
28
+        parent::setUp();
29
+    }
30 30
 
31
-	/**
32
-	 * @covers ::location
33
-	 */
34
-	public function testLocation() {
35
-		$marker = $this->_marker;
31
+    /**
32
+     * @covers ::location
33
+     */
34
+    public function testLocation() {
35
+        $marker = $this->_marker;
36 36
 
37
-		$this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Location', $this->_marker->location());
38
-		$this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Marker_Label', $marker->label());
39
-		$this->assertInternalType('double', $marker->latitude());
40
-		$this->assertInternalType('double', $marker->longitude());
41
-		$this->assertInternalType('string', $marker->title());
42
-		$this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Info_Window', $marker->info_window());
43
-		$this->assertInternalType('array', $marker->marker_args());
44
-	}
37
+        $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Location', $this->_marker->location());
38
+        $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Marker_Label', $marker->label());
39
+        $this->assertInternalType('double', $marker->latitude());
40
+        $this->assertInternalType('double', $marker->longitude());
41
+        $this->assertInternalType('string', $marker->title());
42
+        $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Info_Window', $marker->info_window());
43
+        $this->assertInternalType('array', $marker->marker_args());
44
+    }
45 45
 
46
-	/**
47
-	 * @coversNothing
48
-	 */
49
-	public function testInfoWindow() {
50
-		$window = $this->_marker->info_window();
46
+    /**
47
+     * @coversNothing
48
+     */
49
+    public function testInfoWindow() {
50
+        $window = $this->_marker->info_window();
51 51
 
52
-		$this->assertInternalType('string', $window->content());
53
-		$this->assertInternalType('integer', $window->pixel_offset());
54
-		$this->assertInternalType('array', $window->position());
55
-		$this->assertNull($window->max_width());
56
-	}
52
+        $this->assertInternalType('string', $window->content());
53
+        $this->assertInternalType('integer', $window->pixel_offset());
54
+        $this->assertInternalType('array', $window->position());
55
+        $this->assertNull($window->max_width());
56
+    }
57 57
 
58
-	/**
59
-	 * @coversNothing
60
-	 */
61
-	public function testMarkerLabel() {
62
-		$label = $this->_marker->label();
58
+    /**
59
+     * @coversNothing
60
+     */
61
+    public function testMarkerLabel() {
62
+        $label = $this->_marker->label();
63 63
 
64
-		$this->assertInternalType('string', $label->color(), 'Color is not a string');
65
-		$this->assertInternalType('string', $label->font_family(), 'font_family is not a string');
66
-		$this->assertInternalType('string', $label->font_size(), 'font_size is not a string');
67
-		$this->assertInternalType('string', $label->font_weight());
68
-		$this->assertInternalType('string', $label->text());
69
-	}
64
+        $this->assertInternalType('string', $label->color(), 'Color is not a string');
65
+        $this->assertInternalType('string', $label->font_family(), 'font_family is not a string');
66
+        $this->assertInternalType('string', $label->font_size(), 'font_size is not a string');
67
+        $this->assertInternalType('string', $label->font_weight());
68
+        $this->assertInternalType('string', $label->text());
69
+    }
70 70
 
71 71
 }
Please login to merge, or discard this patch.
tests/unit/testGeocoder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     public function testMakeLocation() {
67 67
         $response = json_decode($this->get_sample_response(), true);
68 68
 
69
-	    /**
70
-	     * @var Location $location
71
-	     */
69
+        /**
70
+         * @var Location $location
71
+         */
72 72
         $location = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_location', $response['results'][0] );
73 73
 
74 74
         $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Location', $location);
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
         $this->assertArrayHasKey('lng', $location->viewport()['southwest']);
91 91
         $this->assertEquals(37.4211274197085, $location->viewport()['southwest']['lat']);
92 92
         $this->assertEquals(-122.0855988802915, $location->viewport()['southwest']['lng']);
93
-	    $this->assertEquals('CA', $location->state());
94
-	    $this->assertEquals('94043', $location->zip_code());
93
+        $this->assertEquals('CA', $location->state());
94
+        $this->assertEquals('94043', $location->zip_code());
95 95
     }
96 96
 
97 97
     /**
Please login to merge, or discard this patch.
tests/unit/testMarkerModel.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
      */
27 27
     private $_geocoder;
28 28
 
29
-	/**
30
-	 * @var array
31
-	 */
32
-	private $_position = array( 'lat' => 37.4224764, 'lng' => -122.0842499);
29
+    /**
30
+     * @var array
31
+     */
32
+    private $_position = array( 'lat' => 37.4224764, 'lng' => -122.0842499);
33 33
 
34 34
     public function setUp() {
35 35
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $this->_model = new Marker_Model([
39 39
             'address'  => $this->_address,
40 40
             'geocoder' => $this->_geocoder,
41
-	        'title'    => 'Sample Title'
41
+            'title'    => 'Sample Title'
42 42
         ]);
43 43
     }
44 44
 
@@ -72,29 +72,29 @@  discard block
 block discarded – undo
72 72
         $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Geocoder',  $this->reflectionMethodInvoke($marker_model, '_geocoder'));
73 73
     }
74 74
 
75
-	/**
76
-	 * @covers ::position
77
-	 */
75
+    /**
76
+     * @covers ::position
77
+     */
78 78
     public function testPosition() {
79
-    	$this->assertEquals($this->_position, $this->_model->position());
79
+        $this->assertEquals($this->_position, $this->_model->position());
80 80
     }
81 81
 
82
-	/**
83
-	 * @covers ::title
84
-	 */
82
+    /**
83
+     * @covers ::title
84
+     */
85 85
     public function testTitle() {
86
-    	$this->assertEquals('Sample Title', $this->_model->title());
86
+        $this->assertEquals('Sample Title', $this->_model->title());
87 87
     }
88 88
 
89 89
     public function testMarkerArgs() {
90 90
 
91
-    	$args = $this->_model->marker_args();
91
+        $args = $this->_model->marker_args();
92 92
 
93
-	    $this->assertInternalType('array', $args);
94
-	    $this->assertArrayHasKey('position', $args);
95
-	    $this->assertArrayHasKey('label', $args);
96
-	    $this->assertArrayHasKey('title', $args);
97
-	    $this->assertEquals($this->_position, $args['position']);
98
-	    $this->assertEquals('Sample Title', $args['title']);
93
+        $this->assertInternalType('array', $args);
94
+        $this->assertArrayHasKey('position', $args);
95
+        $this->assertArrayHasKey('label', $args);
96
+        $this->assertArrayHasKey('title', $args);
97
+        $this->assertEquals($this->_position, $args['position']);
98
+        $this->assertEquals('Sample Title', $args['title']);
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
tests/unit/testMapModel.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -81,52 +81,52 @@
 block discarded – undo
81 81
         $this->assertEquals(12, $this->_model->zoom());
82 82
     }
83 83
 
84
-	/**
85
-	 * @covers ::make_args
86
-	 */
84
+    /**
85
+     * @covers ::make_args
86
+     */
87 87
     public function testMakeArgs() {
88 88
 
89
-    	$args = $this->_model->make_args();
89
+        $args = $this->_model->make_args();
90 90
 
91
-	    $this->assertInternalType('array', $args);
92
-	    $this->assertArrayHasKey('center', $args);
93
-	    $this->assertArrayHasKey('zoom', $args);
94
-	    $this->assertInternalType('array', $args['center']);
95
-	    $this->assertInternalType('integer', $args['zoom']);
96
-	    $this->assertArrayHasKey('lat', $args['center']);
97
-	    $this->assertArrayHasKey('lat', $args['center']);
98
-	    $this->assertInternalType('float', $args['center']['lat']);
99
-	    $this->assertInternalType('float', $args['center']['lng']);
91
+        $this->assertInternalType('array', $args);
92
+        $this->assertArrayHasKey('center', $args);
93
+        $this->assertArrayHasKey('zoom', $args);
94
+        $this->assertInternalType('array', $args['center']);
95
+        $this->assertInternalType('integer', $args['zoom']);
96
+        $this->assertArrayHasKey('lat', $args['center']);
97
+        $this->assertArrayHasKey('lat', $args['center']);
98
+        $this->assertInternalType('float', $args['center']['lat']);
99
+        $this->assertInternalType('float', $args['center']['lng']);
100 100
 
101 101
     }
102 102
 
103
-	/**
104
-	 * @covers ::height
105
-	 */
103
+    /**
104
+     * @covers ::height
105
+     */
106 106
     public function testHeight() {
107 107
 
108
-    	$this->assertEquals('400px', $this->_model->height());
108
+        $this->assertEquals('400px', $this->_model->height());
109 109
 
110 110
     }
111 111
 
112
-	/**
113
-	 * @covers ::width
114
-	 */
112
+    /**
113
+     * @covers ::width
114
+     */
115 115
     public function testWidth() {
116 116
 
117
-    	$this->assertEquals('100%', $this->_model->width());
117
+        $this->assertEquals('100%', $this->_model->width());
118 118
 
119 119
     }
120 120
 
121
-	/**
122
-	 * @covers ::html_id
123
-	 */
121
+    /**
122
+     * @covers ::html_id
123
+     */
124 124
     public function testHtmlId() {
125 125
 
126
-    	$id = $this->_model->html_id();
126
+        $id = $this->_model->html_id();
127 127
 
128
-    	$this->assertInternalType('string', $id);
129
-	    $this->assertStringStartsWith('map-', $id);
128
+        $this->assertInternalType('string', $id);
129
+        $this->assertStringStartsWith('map-', $id);
130 130
 
131 131
     }
132 132
 
Please login to merge, or discard this patch.
tests/unit/testInfoWindowModel.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -13,58 +13,58 @@
 block discarded – undo
13 13
  */
14 14
 class TestInfoWindowModel extends TestCase {
15 15
 
16
-	/**
17
-	 * @var Info_Window_Model
18
-	 */
19
-	private $_model;
16
+    /**
17
+     * @var Info_Window_Model
18
+     */
19
+    private $_model;
20 20
 
21
-	public function setUp() {
21
+    public function setUp() {
22 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,
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 28
 
29
-		));
30
-		parent::setUp();
29
+        ));
30
+        parent::setUp();
31 31
 
32
-	}
32
+    }
33 33
 
34
-	/**
35
-	 * @covers ::content
36
-	 */
37
-	public function testContent() {
34
+    /**
35
+     * @covers ::content
36
+     */
37
+    public function testContent() {
38 38
 
39
-		$this->assertEquals('Lorem ipsum dolor est.', $this->_model->content());
39
+        $this->assertEquals('Lorem ipsum dolor est.', $this->_model->content());
40 40
 
41
-	}
41
+    }
42 42
 
43
-	/**
44
-	 * @covers ::pixel_offset
45
-	 */
46
-	public function testPixelOffset() {
43
+    /**
44
+     * @covers ::pixel_offset
45
+     */
46
+    public function testPixelOffset() {
47 47
 
48
-		$this->assertEquals(20, $this->_model->pixel_offset());
48
+        $this->assertEquals(20, $this->_model->pixel_offset());
49 49
 
50
-	}
50
+    }
51 51
 
52
-	/**
53
-	 * @covers ::position
54
-	 */
55
-	public function testPosition() {
52
+    /**
53
+     * @covers ::position
54
+     */
55
+    public function testPosition() {
56 56
 
57
-		$this->assertEquals(array('lat' => 100.946382, 'lng' => -100.9473927), $this->_model->position());
57
+        $this->assertEquals(array('lat' => 100.946382, 'lng' => -100.9473927), $this->_model->position());
58 58
 
59
-	}
59
+    }
60 60
 
61
-	/**
62
-	 * @covers ::max_width
63
-	 */
64
-	public function testMaxWidth() {
61
+    /**
62
+     * @covers ::max_width
63
+     */
64
+    public function testMaxWidth() {
65 65
 
66
-		$this->assertEquals(500, $this->_model->max_width());
66
+        $this->assertEquals(500, $this->_model->max_width());
67 67
 
68
-	}
68
+    }
69 69
 
70 70
 }
Please login to merge, or discard this patch.
tests/unit/testMarkerLabelModel.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -16,61 +16,61 @@
 block discarded – undo
16 16
  */
17 17
 class testMarkerLabelModel extends TestCase {
18 18
 
19
-	/**
20
-	 * @var Marker_Label_Model
21
-	 */
22
-	private $_model;
23
-
24
-	public function setUp() {
25
-
26
-		$this->_model = new Marker_Label_Model();
27
-		parent::setUp();
28
-
29
-	}
30
-
31
-	/**
32
-	 * @covers ::color
33
-	 * @covers ::font_family
34
-	 * @covers ::font_size
35
-	 * @covers ::font_weight
36
-	 * @covers ::text
37
-	 */
38
-	public function testDefaults() {
39
-
40
-
41
-		$this->assertEquals('black', $this->_model->color());
42
-		$this->assertInternalType('string', $this->_model->font_family());
43
-		$this->assertEmpty($this->_model->font_family());
44
-		$this->assertEquals('14px', $this->_model->font_size());
45
-		$this->assertEquals('400', $this->_model->font_weight());
46
-		$this->assertInternalType('string', $this->_model->text());
47
-		$this->assertEmpty($this->_model->text());
48
-
49
-	}
50
-
51
-	/**
52
-	 * @covers ::color
53
-	 * @covers ::font_family
54
-	 * @covers ::font_size
55
-	 * @covers ::font_weight
56
-	 * @covers ::text
57
-	 */
58
-	public function testPassedArguments() {
59
-
60
-		$model = new Marker_Label_Model(array(
61
-			'color'       => 'blue',
62
-			'font_family' => 'Arial',
63
-			'font_size'   => '22px',
64
-			'font_weight' => 900,
65
-			'text'        => 'Lorem ipsum dolor est',
66
-		));
67
-
68
-		$this->assertEquals('blue', $model->color());
69
-		$this->assertEquals('Arial', $model->font_family());
70
-		$this->assertEquals('22px', $model->font_size());
71
-		$this->assertEquals('900', $model->font_weight());
72
-		$this->assertEquals('Lorem ipsum dolor est', $model->text());
73
-
74
-	}
19
+    /**
20
+     * @var Marker_Label_Model
21
+     */
22
+    private $_model;
23
+
24
+    public function setUp() {
25
+
26
+        $this->_model = new Marker_Label_Model();
27
+        parent::setUp();
28
+
29
+    }
30
+
31
+    /**
32
+     * @covers ::color
33
+     * @covers ::font_family
34
+     * @covers ::font_size
35
+     * @covers ::font_weight
36
+     * @covers ::text
37
+     */
38
+    public function testDefaults() {
39
+
40
+
41
+        $this->assertEquals('black', $this->_model->color());
42
+        $this->assertInternalType('string', $this->_model->font_family());
43
+        $this->assertEmpty($this->_model->font_family());
44
+        $this->assertEquals('14px', $this->_model->font_size());
45
+        $this->assertEquals('400', $this->_model->font_weight());
46
+        $this->assertInternalType('string', $this->_model->text());
47
+        $this->assertEmpty($this->_model->text());
48
+
49
+    }
50
+
51
+    /**
52
+     * @covers ::color
53
+     * @covers ::font_family
54
+     * @covers ::font_size
55
+     * @covers ::font_weight
56
+     * @covers ::text
57
+     */
58
+    public function testPassedArguments() {
59
+
60
+        $model = new Marker_Label_Model(array(
61
+            'color'       => 'blue',
62
+            'font_family' => 'Arial',
63
+            'font_size'   => '22px',
64
+            'font_weight' => 900,
65
+            'text'        => 'Lorem ipsum dolor est',
66
+        ));
67
+
68
+        $this->assertEquals('blue', $model->color());
69
+        $this->assertEquals('Arial', $model->font_family());
70
+        $this->assertEquals('22px', $model->font_size());
71
+        $this->assertEquals('900', $model->font_weight());
72
+        $this->assertEquals('Lorem ipsum dolor est', $model->text());
73
+
74
+    }
75 75
 
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.