Completed
Pull Request — master (#22)
by Daryl
01:32
created

TestGoogleMaps   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 23
rs 10
1
<?php
2
3
namespace Clubdeuce\WPLib\Components\GoogleMaps\Tests\Integration;
4
5
use Clubdeuce\WPLib\Components\Google_Maps;
6
use Clubdeuce\WPLib\Components\GoogleMaps\Tests\TestCase;
7
8
/**
9
 * Class TestGoogleMaps
10
 * @package            Clubdeuce\WPLib\Components\GoogleMaps\Tests\Integration
11
 * @coversDefaultClass Clubdeuce\WPLib\Components\Google_Maps
12
 * @group              Google_Maps
13
 * @group              Integration
14
 */
15
class TestGoogleMaps extends TestCase {
16
17
	public function setUp() {
18
		Google_Maps::register_script_condition(true);
19
		wp_enqueue_scripts();
20
	}
21
22
	/**
23
	 * @coversNothing
24
	 */
25
	function testScriptRegistered() {
26
		$this->assertTrue(wp_script_is('google-maps', 'registered'));
27
		$this->assertTrue(wp_script_is('map-control', 'registered'));
28
	}
29
30
	/**
31
	 * @coversNothing
32
	 * @depends testScriptRegistered
33
	 */
34
	function testScriptEnqueued() {
35
36
		$this->assertTrue(wp_script_is('google-maps', 'enqueued'));
37
		$this->assertTrue(wp_script_is('map-control', 'enqueued'));
38
39
	}
40
}