Skip to content

Commit 86f5bb5

Browse files
authored
Update test-sample.php
1 parent 081cb07 commit 86f5bb5

File tree

1 file changed

+35
-12
lines changed

1 file changed

+35
-12
lines changed

tests/test-sample.php

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
11
<?php
22
/**
3-
* Class SampleTest
3+
* Class WP_Test_BootstrapLoader
44
*
55
* @package Wp_Bootstrap_Loader
66
*/
77

8-
/**
9-
* Sample test case.
10-
*/
11-
class SampleTest extends WP_UnitTestCase {
8+
<?php
129

13-
/**
14-
* A single example test.
15-
*/
16-
function test_sample() {
17-
// Replace this with some actual testing code.
18-
$this->assertTrue( true );
19-
}
10+
class WP_Test_BootstrapLoader extends WP_UnitTestCase {
11+
12+
// Test jQuery is Loaded.
13+
function testjQueryIsLoaded() {
14+
15+
$this->assertFalse( wp_script_is( 'jquery' ) );
16+
17+
do_action( 'wp_enqueue_scripts' );
18+
$this->assertTrue( wp_script_is( 'jquery' ) );
19+
20+
}
21+
22+
// Test Bootstrap is Loaded.
23+
function testjQueryIsLoaded() {
24+
25+
$this->assertFalse( wp_script_is( 'bootstrap' ) );
26+
27+
do_action( 'wp_enqueue_scripts' );
28+
$this->assertTrue( wp_script_is( 'bootstrap' ) );
29+
30+
}
31+
32+
// Test WebFont is Loaded.
33+
function testjQueryIsLoaded() {
34+
35+
$this->assertFalse( wp_script_is( 'webfont' ) );
36+
37+
do_action( 'wp_enqueue_scripts' );
38+
$this->assertTrue( wp_script_is( 'webfont' ) );
39+
40+
}
41+
2042
}
43+

0 commit comments

Comments
 (0)