Completed
Push — try/xmlrpc-server-package-clas... ( 6199c0...8e0ceb )
by
unknown
07:26
created

Test_Logo::test_constructor_default_logo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
use Automattic\Jetpack\Assets\Logo;
4
5
use PHPUnit\Framework\TestCase;
6
7
class Test_Logo extends TestCase {
8
9
	/**
10
	 * Ensure the rendered logo has all the CSS classes needed for styling.
11
	 */
12
	function test_constructor_default_logo() {
13
		$logo = new Logo();
14
		$logo_render = $logo->render();
15
		$this->assertContains( '<svg xmlns="http://www.w3.org/2000/svg"', $logo_render );
16
		$this->assertContains( 'class="jetpack-logo"', $logo_render );
17
		$this->assertContains( 'class="jetpack-logo__icon-circle"', $logo_render );
18
		$this->assertEquals( 2, preg_match_all( '/class="jetpack-logo__icon-triangle"/', $logo_render ) );
19
		$this->assertContains( 'class="jetpack-logo__text"', $logo_render );
20
	}
21
22
}
23