Completed
Push — master ( 09d055...51cf8d )
by Daryl
04:01
created
RoboFile.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 	function tests()
11 11
 	{
12 12
 
13
-		$this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run();
14
-		$this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run();
13
+		$this->taskExec( 'mysql -e "CREATE DATABASE IF NOT EXISTS test_db"' )->run();
14
+		$this->taskExec( 'mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"' )->run();
15 15
 		$this->taskSvnStack()
16
-			->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests')
16
+			->checkout( 'https://develop.svn.wordpress.org/tags/4.8.3 wp-tests' )
17 17
 			->run();
18 18
 
19 19
 		$this->setTestConfig();
@@ -23,31 +23,31 @@  discard block
 block discarded – undo
23 23
 
24 24
 	function phpunit()
25 25
 	{
26
-		$this->taskPhpUnit('vendor/bin/phpunit')
27
-		     ->configFile('tests/phpunit.xml.dist')
26
+		$this->taskPhpUnit( 'vendor/bin/phpunit' )
27
+		     ->configFile( 'tests/phpunit.xml.dist' )
28 28
 		     ->run();
29 29
 	}
30 30
 
31 31
 	private function setTestConfig()
32 32
 	{
33 33
 
34
-		if (file_exists('wp-tests/wp-tests-config-sample.php')) {
35
-			copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php');
34
+		if ( file_exists( 'wp-tests/wp-tests-config-sample.php' ) ) {
35
+			copy( 'wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php' );
36 36
 		}
37 37
 
38
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
39
-			->from('youremptytestdbnamehere')
40
-			->to('test_db')
38
+		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php' )
39
+			->from( 'youremptytestdbnamehere' )
40
+			->to( 'test_db' )
41 41
 			->run();
42 42
 
43
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
44
-			->from('yourusernamehere')
45
-			->to('root')
43
+		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php' )
44
+			->from( 'yourusernamehere' )
45
+			->to( 'root' )
46 46
 			->run();
47 47
 
48
-		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
49
-			->from('yourpasswordhere')
50
-			->to('')
48
+		$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php' )
49
+			->from( 'yourpasswordhere' )
50
+			->to( '' )
51 51
 			->run();
52 52
 	}
53 53
 
Please login to merge, or discard this patch.
tests/integration/testGeocoder.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -20,38 +20,38 @@  discard block
 block discarded – undo
20 20
     private $_geocoder;
21 21
 
22 22
     public function setUp() {
23
-        $this->_geocoder = new Geocoder(['api_key' => getenv('MAPS_API_KEY')]);
23
+        $this->_geocoder = new Geocoder( ['api_key' => getenv( 'MAPS_API_KEY' )] );
24 24
     }
25 25
 
26 26
     /**
27 27
      * @covers ::_make_request
28 28
      */
29 29
     public function testMakeRequest() {
30
-        $url      = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_url', '1600 Amphitheatre Parkway, Mountain View, CA');
31
-        $response = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_request', $url);
30
+        $url      = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_url', '1600 Amphitheatre Parkway, Mountain View, CA' );
31
+        $response = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_request', $url );
32 32
 
33
-        $this->assertInternalType('array', $response);
33
+        $this->assertInternalType( 'array', $response );
34 34
     }
35 35
 
36 36
     /**
37 37
      * @covers ::_make_request
38 38
      */
39 39
     public function testMakeRequestError404() {
40
-        $response = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_request', 'https://maps.googleapis.com/maps/api/geo');
40
+        $response = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_request', 'https://maps.googleapis.com/maps/api/geo' );
41 41
 
42
-        $this->assertInstanceOf('WP_Error', $response);
43
-        $this->assertObjectHasAttribute('errors', $response);
44
-        $this->assertArrayHasKey('404', $response->errors);
42
+        $this->assertInstanceOf( 'WP_Error', $response );
43
+        $this->assertObjectHasAttribute( 'errors', $response );
44
+        $this->assertArrayHasKey( '404', $response->errors );
45 45
     }
46 46
 
47 47
     /**
48 48
      * @covers ::_get_data
49 49
      */
50 50
     public function testGetData() {
51
-        $url      = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_url', '1600 Amphitheatre Parkway, Mountain View, CA');
52
-        $response = $this->reflectionMethodInvokeArgs($this->_geocoder, '_get_data', $url);
51
+        $url      = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_url', '1600 Amphitheatre Parkway, Mountain View, CA' );
52
+        $response = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_get_data', $url );
53 53
 
54
-        $this->assertInternalType('array', $response);
54
+        $this->assertInternalType( 'array', $response );
55 55
     }
56 56
 
57 57
     /**
@@ -59,25 +59,25 @@  discard block
 block discarded – undo
59 59
      * @covers ::_make_location
60 60
      */
61 61
     public function testGeocode() {
62
-        $location = $this->_geocoder->geocode('1600 Amphitheatre Parkway, Mountain View, CA');
62
+        $location = $this->_geocoder->geocode( '1600 Amphitheatre Parkway, Mountain View, CA' );
63 63
 
64
-        $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Location', $location);
65
-        $this->assertInternalType('string', $location->address());
66
-        $this->assertInternalType('string', $location->formatted_address());
67
-        $this->assertInternalType('double', $location->latitude());
68
-        $this->assertInternalType('double', $location->longitude());
69
-        $this->assertInternalType('array', $location->viewport());
70
-        $this->assertArrayHasKey('northeast', $location->viewport());
71
-        $this->assertArrayHasKey('southwest', $location->viewport());
72
-        $this->assertInternalType('array', $location->viewport()['northeast']);
73
-        $this->assertArrayHasKey('lat', $location->viewport()['northeast']);
74
-        $this->assertArrayHasKey('lng', $location->viewport()['northeast']);
75
-        $this->assertInternalType('double', $location->viewport()['northeast']['lat']);
76
-        $this->assertInternalType('double', $location->viewport()['northeast']['lng']);
77
-        $this->assertInternalType('array', $location->viewport()['southwest']);
78
-        $this->assertArrayHasKey('lat', $location->viewport()['southwest']);
79
-        $this->assertArrayHasKey('lng', $location->viewport()['southwest']);
80
-        $this->assertInternalType('double', $location->viewport()['southwest']['lat']);
81
-        $this->assertInternalType('double', $location->viewport()['southwest']['lng']);
64
+        $this->assertInstanceOf( '\Clubdeuce\WPLib\Components\GoogleMaps\Location', $location );
65
+        $this->assertInternalType( 'string', $location->address() );
66
+        $this->assertInternalType( 'string', $location->formatted_address() );
67
+        $this->assertInternalType( 'double', $location->latitude() );
68
+        $this->assertInternalType( 'double', $location->longitude() );
69
+        $this->assertInternalType( 'array', $location->viewport() );
70
+        $this->assertArrayHasKey( 'northeast', $location->viewport() );
71
+        $this->assertArrayHasKey( 'southwest', $location->viewport() );
72
+        $this->assertInternalType( 'array', $location->viewport()['northeast'] );
73
+        $this->assertArrayHasKey( 'lat', $location->viewport()['northeast'] );
74
+        $this->assertArrayHasKey( 'lng', $location->viewport()['northeast'] );
75
+        $this->assertInternalType( 'double', $location->viewport()['northeast']['lat'] );
76
+        $this->assertInternalType( 'double', $location->viewport()['northeast']['lng'] );
77
+        $this->assertInternalType( 'array', $location->viewport()['southwest'] );
78
+        $this->assertArrayHasKey( 'lat', $location->viewport()['southwest'] );
79
+        $this->assertArrayHasKey( 'lng', $location->viewport()['southwest'] );
80
+        $this->assertInternalType( 'double', $location->viewport()['southwest']['lat'] );
81
+        $this->assertInternalType( 'double', $location->viewport()['southwest']['lng'] );
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
includes/class-map-model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     function html_id() {
85 85
 
86
-        if ( ! isset( $this->_html_id ) ) {
86
+        if ( !isset($this->_html_id) ) {
87 87
             $this->_html_id = sprintf( 'map-%1$s', md5( serialize( array( $this->center(), $this->markers() ) ) ) );
88 88
         }
89 89
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 		return array(
127 127
 			'center' => $this->center(),
128
-			'zoom'   => (int)$this->zoom()
128
+			'zoom'   => ( int ) $this->zoom()
129 129
 		);
130 130
 
131 131
 	}
Please login to merge, or discard this patch.
tests/unit/testMapModel.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     
26 26
     public function setUp() {
27 27
         
28
-        $this->_model = new Map_Model(array('center' => $this->_center, 'markers' => array('foo', 'bar', 'baz'), 'zoom' => 12));
28
+        $this->_model = new Map_Model( array( 'center' => $this->_center, 'markers' => array( 'foo', 'bar', 'baz' ), 'zoom' => 12 ) );
29 29
         
30 30
     }
31 31
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function testCenter() {
36 36
 
37
-        $this->assertEquals($this->_center, $this->_model->center());
37
+        $this->assertEquals( $this->_center, $this->_model->center() );
38 38
 
39 39
     }
40 40
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function testMarkers() {
45 45
 
46
-        $this->assertEquals(array('foo','bar','baz'), $this->_model->markers());
46
+        $this->assertEquals( array( 'foo', 'bar', 'baz' ), $this->_model->markers() );
47 47
 
48 48
     }
49 49
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
      */
54 54
     function testAddMarker() {
55 55
 
56
-        $this->_model->add_marker('foobar');
56
+        $this->_model->add_marker( 'foobar' );
57 57
 
58
-        $this->assertContains('foobar', $this->_model->markers());
58
+        $this->assertContains( 'foobar', $this->_model->markers() );
59 59
 
60 60
     }
61 61
 
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
      */
66 66
     function testAddMarkers() {
67 67
 
68
-        $this->_model->add_markers(array('foobar', 'barbaz'));
68
+        $this->_model->add_markers( array( 'foobar', 'barbaz' ) );
69 69
 
70 70
         $markers = $this->_model->markers();
71 71
 
72
-        $this->assertContains('foobar', $markers);
73
-        $this->assertContains('barbaz', $markers);
72
+        $this->assertContains( 'foobar', $markers );
73
+        $this->assertContains( 'barbaz', $markers );
74 74
 
75 75
     }
76 76
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @covers ::zoom
79 79
      */
80 80
     public function testZoom() {
81
-        $this->assertEquals(12, $this->_model->zoom());
81
+        $this->assertEquals( 12, $this->_model->zoom() );
82 82
     }
83 83
 
84 84
 	/**
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
 
89 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
 }
Please login to merge, or discard this patch.
tests/includes/testCase.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $reflection = new \ReflectionMethod( $class, $method );
43 43
         $reflection->setAccessible( true );
44
-        if (is_string($class)) {
44
+        if ( is_string( $class ) ) {
45 45
             $class = null;
46 46
         }
47 47
         return $reflection->invoke( $class );
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $reflection = new \ReflectionMethod( $class, $method );
59 59
         $reflection->setAccessible( true );
60
-        if (is_string($class)) {
60
+        if ( is_string( $class ) ) {
61 61
             $class = null;
62 62
         }
63 63
         return $reflection->invoke( $class, $args );
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
     public function get_sample_response() {
70 70
 
71
-    	return file_get_contents( __DIR__ . '/geocoder-response.json' );
71
+    	return file_get_contents( __DIR__.'/geocoder-response.json' );
72 72
 
73 73
     }
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@
 block discarded – undo
1 1
 <?php
2
-define('SRC_DIR', dirname(__DIR__));
3
-define('VENDOR_DIRECTORY', SRC_DIR . '/vendor');
4
-define('TEST_INCLUDES_DIR', SRC_DIR . '/includes');
2
+define( 'SRC_DIR', dirname( __DIR__ ) );
3
+define( 'VENDOR_DIRECTORY', SRC_DIR.'/vendor' );
4
+define( 'TEST_INCLUDES_DIR', SRC_DIR.'/includes' );
5 5
 
6
-require_once getenv( 'WP_TESTS_DIR' ) . '/tests/phpunit/includes/functions.php';
7
-require getenv( 'WP_TESTS_DIR' ) . '/tests/phpunit/includes/bootstrap.php';
6
+require_once getenv( 'WP_TESTS_DIR' ).'/tests/phpunit/includes/functions.php';
7
+require getenv( 'WP_TESTS_DIR' ).'/tests/phpunit/includes/bootstrap.php';
8 8
 
9 9
 require 'includes/testCase.php';
10 10
 
11
-require VENDOR_DIRECTORY . '/autoload.php';
11
+require VENDOR_DIRECTORY.'/autoload.php';
12 12
 
13
-if ( ! function_exists( 'wplib_define' ) ) {
14
-    require( VENDOR_DIRECTORY . '/wplib/wplib/defines.php' );
13
+if ( !function_exists( 'wplib_define' ) ) {
14
+    require(VENDOR_DIRECTORY.'/wplib/wplib/defines.php');
15 15
     wplib_define( 'WPLib_Runmode', 'PRODUCTION' );
16 16
     wplib_define( 'WPLib_Stability', 'EXPERIMENTAL' );
17 17
 }
18 18
 
19
-require VENDOR_DIRECTORY . '/wplib/wplib/wplib.php';
19
+require VENDOR_DIRECTORY.'/wplib/wplib/wplib.php';
20 20
 WPLib::initialize();
21 21
 
22
-require_once dirname(__DIR__) . '/includes/class-geocoder.php';
23
-require_once dirname(__DIR__) . '/includes/class-info-window-model.php';
24
-require_once dirname(__DIR__) . '/includes/class-info-window-view.php';
25
-require_once dirname(__DIR__) . '/includes/class-info-window.php';
26
-require_once dirname(__DIR__) . '/includes/class-location.php';
27
-require_once dirname(__DIR__) . '/includes/class-location-model.php';
28
-require_once dirname(__DIR__) . '/includes/class-location-view.php';
29
-require_once dirname(__DIR__) . '/includes/class-map.php';
30
-require_once dirname(__DIR__) . '/includes/class-map-model.php';
31
-require_once dirname(__DIR__) . '/includes/class-map-view.php';
32
-require_once dirname(__DIR__) . '/includes/class-marker.php';
33
-require_once dirname(__DIR__) . '/includes/class-marker-label.php';
34
-require_once dirname(__DIR__) . '/includes/class-marker-label-model.php';
35
-require_once dirname(__DIR__) . '/includes/class-marker-label-view.php';
36
-require_once dirname(__DIR__) . '/includes/class-marker-model.php';
37
-require_once dirname(__DIR__) . '/includes/class-marker-view.php';
38
-require_once dirname(__DIR__) . '/component-google-maps.php';
22
+require_once dirname( __DIR__ ).'/includes/class-geocoder.php';
23
+require_once dirname( __DIR__ ).'/includes/class-info-window-model.php';
24
+require_once dirname( __DIR__ ).'/includes/class-info-window-view.php';
25
+require_once dirname( __DIR__ ).'/includes/class-info-window.php';
26
+require_once dirname( __DIR__ ).'/includes/class-location.php';
27
+require_once dirname( __DIR__ ).'/includes/class-location-model.php';
28
+require_once dirname( __DIR__ ).'/includes/class-location-view.php';
29
+require_once dirname( __DIR__ ).'/includes/class-map.php';
30
+require_once dirname( __DIR__ ).'/includes/class-map-model.php';
31
+require_once dirname( __DIR__ ).'/includes/class-map-view.php';
32
+require_once dirname( __DIR__ ).'/includes/class-marker.php';
33
+require_once dirname( __DIR__ ).'/includes/class-marker-label.php';
34
+require_once dirname( __DIR__ ).'/includes/class-marker-label-model.php';
35
+require_once dirname( __DIR__ ).'/includes/class-marker-label-view.php';
36
+require_once dirname( __DIR__ ).'/includes/class-marker-model.php';
37
+require_once dirname( __DIR__ ).'/includes/class-marker-view.php';
38
+require_once dirname( __DIR__ ).'/component-google-maps.php';
Please login to merge, or discard this patch.
tests/unit/testGeocoder.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      *
28 28
      */
29 29
     public function setUp() {
30
-        $this->_geocoder = new Geocoder(['api_key' => $this->_api_key]);
30
+        $this->_geocoder = new Geocoder( ['api_key' => $this->_api_key] );
31 31
     }
32 32
 
33 33
     /**
@@ -35,54 +35,54 @@  discard block
 block discarded – undo
35 35
      * @covers ::api_key
36 36
      */
37 37
     public function testConstructorWithAPIKey() {
38
-        $this->assertEquals($this->_api_key, $this->_geocoder->api_key());
38
+        $this->assertEquals( $this->_api_key, $this->_geocoder->api_key() );
39 39
     }
40 40
 
41 41
     /**
42 42
      * @covers ::_make_url
43 43
      */
44 44
     public function testMakeUrl() {
45
-        $response = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_url', '123 Anywhere Street New York 10001');
45
+        $response = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_url', '123 Anywhere Street New York 10001' );
46 46
 
47
-        $this->assertInternalType('string', $response);
48
-        $this->assertRegExp('/address\=123\+Anywhere\+Street\+New\+York\+10001/', $response);
49
-        $this->assertRegExp("/key={$this->_api_key}/", $response);
47
+        $this->assertInternalType( 'string', $response );
48
+        $this->assertRegExp( '/address\=123\+Anywhere\+Street\+New\+York\+10001/', $response );
49
+        $this->assertRegExp( "/key={$this->_api_key}/", $response );
50 50
     }
51 51
 
52 52
     /**
53 53
      * @covers ::_get_data
54 54
      */
55 55
     public function testGetDataCache() {
56
-        wp_cache_add( md5(serialize('foo.bar')), 'foobar');
56
+        wp_cache_add( md5( serialize( 'foo.bar' ) ), 'foobar' );
57 57
 
58
-        $this->assertEquals('foobar', $this->reflectionMethodInvokeArgs($this->_geocoder, '_get_data', 'foo.bar'));
58
+        $this->assertEquals( 'foobar', $this->reflectionMethodInvokeArgs( $this->_geocoder, '_get_data', 'foo.bar' ) );
59 59
     }
60 60
 
61 61
     /**
62 62
      * @covers ::_make_location
63 63
      */
64 64
     public function testMakeLocation() {
65
-        $response = json_decode($this->get_sample_response(), true);
66
-        $location = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_location', $response['results'][0] );
65
+        $response = json_decode( $this->get_sample_response(), true );
66
+        $location = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_location', $response['results'][0] );
67 67
 
68
-        $this->assertInstanceOf('\Clubdeuce\WPLib\Components\GoogleMaps\Location', $location);
69
-        $this->assertEquals('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA', $location->address());
70
-        $this->assertEquals('1600 Amphitheatre Parkway, Mountain View, CA 94043, USA', $location->formatted_address());
71
-        $this->assertEquals(37.4224764, $location->latitude());
68
+        $this->assertInstanceOf( '\Clubdeuce\WPLib\Components\GoogleMaps\Location', $location );
69
+        $this->assertEquals( '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA', $location->address() );
70
+        $this->assertEquals( '1600 Amphitheatre Parkway, Mountain View, CA 94043, USA', $location->formatted_address() );
71
+        $this->assertEquals( 37.4224764, $location->latitude() );
72 72
         $this->assertEquals(-122.0842499, $location->longitude());
73
-        $this->assertEquals('ChIJ2eUgeAK6j4ARbn5u_wAGqWA', $location->place_id());
74
-        $this->assertInternalType('array', $location->viewport());
75
-        $this->assertArrayHasKey('northeast', $location->viewport());
76
-        $this->assertArrayHasKey('southwest', $location->viewport());
77
-        $this->assertInternalType('array', $location->viewport()['northeast']);
78
-        $this->assertArrayHasKey('lat', $location->viewport()['northeast']);
79
-        $this->assertArrayHasKey('lng', $location->viewport()['northeast']);
80
-        $this->assertEquals(37.4238253802915, $location->viewport()['northeast']['lat']);
73
+        $this->assertEquals( 'ChIJ2eUgeAK6j4ARbn5u_wAGqWA', $location->place_id() );
74
+        $this->assertInternalType( 'array', $location->viewport() );
75
+        $this->assertArrayHasKey( 'northeast', $location->viewport() );
76
+        $this->assertArrayHasKey( 'southwest', $location->viewport() );
77
+        $this->assertInternalType( 'array', $location->viewport()['northeast'] );
78
+        $this->assertArrayHasKey( 'lat', $location->viewport()['northeast'] );
79
+        $this->assertArrayHasKey( 'lng', $location->viewport()['northeast'] );
80
+        $this->assertEquals( 37.4238253802915, $location->viewport()['northeast']['lat'] );
81 81
         $this->assertEquals(-122.0829009197085, $location->viewport()['northeast']['lng']);
82
-        $this->assertInternalType('array', $location->viewport()['southwest']);
83
-        $this->assertArrayHasKey('lat', $location->viewport()['southwest']);
84
-        $this->assertArrayHasKey('lng', $location->viewport()['southwest']);
85
-        $this->assertEquals(37.4211274197085, $location->viewport()['southwest']['lat']);
82
+        $this->assertInternalType( 'array', $location->viewport()['southwest'] );
83
+        $this->assertArrayHasKey( 'lat', $location->viewport()['southwest'] );
84
+        $this->assertArrayHasKey( 'lng', $location->viewport()['southwest'] );
85
+        $this->assertEquals( 37.4211274197085, $location->viewport()['southwest']['lat'] );
86 86
         $this->assertEquals(-122.0855988802915, $location->viewport()['southwest']['lng']);
87 87
     }
88 88
 
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
      * @covers ::_make_request
91 91
      */
92 92
     public function testMakeRequestInvalidURL() {
93
-        $response = $this->reflectionMethodInvokeArgs($this->_geocoder, '_make_request', 'foo.bar');
94
-        $this->assertInstanceOf('WP_Error', $response);
93
+        $response = $this->reflectionMethodInvokeArgs( $this->_geocoder, '_make_request', 'foo.bar' );
94
+        $this->assertInstanceOf( 'WP_Error', $response );
95 95
     }
96 96
 
97 97
 }
98 98
\ No newline at end of file
Please login to merge, or discard this patch.
tests/integration/testGoogleMaps.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 	 * @covers ::_wp_enqueue_scripts_9
19 19
 	 */
20 20
 	function testScriptRegistered() {
21
-		$this->assertTrue(wp_script_is('google-maps', 'registered'));
22
-		$this->assertTrue(wp_script_is('map-control', 'registered'));
21
+		$this->assertTrue( wp_script_is( 'google-maps', 'registered' ) );
22
+		$this->assertTrue( wp_script_is( 'map-control', 'registered' ) );
23 23
 	}
24 24
 
25 25
 	/**
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	function testScriptEnqueued() {
30 30
 
31
-		Google_Maps::register_script_condition(function(){return true;});
31
+		Google_Maps::register_script_condition( function() {return true; });
32 32
 
33
-		$this->assertTrue(wp_script_is('google-maps', 'enqueued'));
34
-		$this->assertTrue(wp_script_is('map-control', 'enqueued'));
33
+		$this->assertTrue( wp_script_is( 'google-maps', 'enqueued' ) );
34
+		$this->assertTrue( wp_script_is( 'map-control', 'enqueued' ) );
35 35
 
36 36
 	}
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.