This repository was archived by the owner on Nov 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ function _manually_load_plugin() {
27
27
$ plugin_root = dirname ( __DIR__ );
28
28
require $ plugin_root . '/vendor/autoload.php ' ;
29
29
require $ plugin_root . '/vendor/antecedent/patchwork/Patchwork.php ' ;
30
- require $ plugin_root . '/tests/php/trait-testing-helper.php ' ;
30
+ require $ plugin_root . '/tests/php/unit/helpers/ trait-testing-helper.php ' ;
31
31
require $ plugin_root . '/block-lab.php ' ;
32
32
}
33
33
tests_add_filter ( 'muplugins_loaded ' , '_manually_load_plugin ' );
Original file line number Diff line number Diff line change @@ -68,6 +68,18 @@ public function test_is_pro() {
68
68
$ this ->assertFalse ( block_lab ()->is_pro () );
69
69
}
70
70
71
+ /**
72
+ * Test loop.
73
+ *
74
+ * @covers \Block_Lab\Util::loop()
75
+ */
76
+ public function test_loop () {
77
+ $ this ->assertEquals ( 'Block_Lab \\Blocks\Loop ' , get_class ( $ this ->instance ->loop () ) );
78
+
79
+ // Calling this singleton function repeatedly should return the same instance of the Loop.
80
+ $ this ->assertEquals ( $ this ->instance ->loop (), $ this ->instance ->loop () );
81
+ }
82
+
71
83
/**
72
84
* Test get_template_locations.
73
85
*
You can’t perform that action at this time.
0 commit comments