Skip to content

Commit c5e8fba

Browse files
authored
Merge pull request #12 from WordPress-Phoenix/full-qualify-namespace
Use fully qualified namespace
2 parents 45ada5f + 06e9ba9 commit c5e8fba

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ 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+
21+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
2122
$result = $plugin->onload( $instance );
2223

2324
$this->assertNull( $result );
@@ -26,12 +27,12 @@ public function test_onload() {
2627
/**
2728
* Test init
2829
*
29-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
30+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::init
3031
*/
3132
public function test_init() {
3233
global $wp_actions;
3334

34-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
35+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
3536
$result = $plugin->init();
3637

3738
$this->assertTrue( isset( $wp_actions['<%= US_SLUG %>_before_init'] ) );
@@ -43,10 +44,10 @@ public function test_init() {
4344
/**
4445
* Test authenticated_init when user is not logged in
4546
*
46-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
47+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
4748
*/
4849
public function test_authenticated_init_when_user_is_not_logged_in() {
49-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
50+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
5051
$authenticated_init = $plugin->authenticated_init();
5152

5253
$this->assertFalse( isset( $plugin->admin ) );
@@ -56,13 +57,13 @@ public function test_authenticated_init_when_user_is_not_logged_in() {
5657
/**
5758
* Test authenticated_init when user is logged in
5859
*
59-
* @covers <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
60+
* @covers \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin::authenticated_init
6061
*/
6162
public function test_authenticated_init_when_user_is_logged_in() {
6263
$user_id = $this->factory->user->create();
6364
wp_set_current_user( $user_id );
6465

65-
$plugin = new <%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
66+
$plugin = new \<%= PRIMARY_NAMESPACE %>\<%= SECONDARY_NAMESPACE %>\Plugin();
6667
$authenticated_init = $plugin->authenticated_init();
6768

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

wordpress-development-toolkit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @author David Ryan - WordPress Phoenix
77
* @license GNU GPL v2.0+
88
* @link https://github.com/wordpress-phoenix
9-
* @version 3.2.0
9+
* @version 3.2.1
1010
*
1111
* Built using WP PHX Plugin Generator v1.1.0 on Tuesday 23rd of January 2018 07:33:12 AM
1212
* @link https://github.com/WordPress-Phoenix/wordpress-development-toolkit

0 commit comments

Comments
 (0)