Skip to content

Commit f1fe9c8

Browse files
committed
Use fully qualified namespace
1 parent 45ada5f commit f1fe9c8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app/boilerplates/simple/tests/admin/test-class-app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ final class App_Test extends WP_UnitTestCase {
1313
/**
1414
* Test __construct
1515
*
16-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Admin\App::__construct
16+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Admin\App::__construct
1717
*/
1818
public function test_construct() {
1919
$installed_dir = '/var/installed/dir';
2020
$installed_url = '/var/installed/url';
2121
$version = 1.0;
2222

23-
$app = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Admin\App( $installed_dir, $installed_url, $version );
23+
$app = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Admin\App( $installed_dir, $installed_url, $version );
2424

2525
$this->assertEquals( $installed_dir, $app->installed_dir );
2626
$this->assertEquals( $installed_url, $app->installed_url );

app/boilerplates/simple/tests/test-class-plugin.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ final class Plugin_Test extends WP_UnitTestCase {
1313
/**
1414
* Test onload
1515
*
16-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::onload
16+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::onload
1717
*/
1818
public function test_onload() {
1919
$instance = new stdClass();
20-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
20+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
2121
$result = $plugin->onload( $instance );
2222

2323
$this->assertNull( $result );
@@ -26,12 +26,12 @@ public function test_onload() {
2626
/**
2727
* Test init
2828
*
29-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
29+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
3030
*/
3131
public function test_init() {
3232
global $wp_actions;
3333

34-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
34+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
3535
$result = $plugin->init();
3636

3737
$this->assertTrue( isset( $wp_actions['<%= US_SLUG %>_before_init'] ) );
@@ -43,10 +43,10 @@ public function test_init() {
4343
/**
4444
* Test authenticated_init when user is not logged in
4545
*
46-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
46+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
4747
*/
4848
public function test_authenticated_init_when_user_is_not_logged_in() {
49-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
49+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
5050
$authenticated_init = $plugin->authenticated_init();
5151

5252
$this->assertFalse( isset( $plugin->admin ) );
@@ -56,13 +56,13 @@ public function test_authenticated_init_when_user_is_not_logged_in() {
5656
/**
5757
* Test authenticated_init when user is logged in
5858
*
59-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
59+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
6060
*/
6161
public function test_authenticated_init_when_user_is_logged_in() {
6262
$user_id = $this->factory->user->create();
6363
wp_set_current_user( $user_id );
6464

65-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
65+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
6666
$authenticated_init = $plugin->authenticated_init();
6767

6868
$this->assertTrue( isset( $plugin->admin ) );

0 commit comments

Comments
 (0)