Skip to content

Commit 003a00e

Browse files
committed
Coding standards.
1 parent 39a7667 commit 003a00e

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

tests/phpunit/HooksTest.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use PHPUnit\Framework\TestCase;
77
use WPHooks\Hook;
88
use WPHooks\Hooks;
9-
use WPHooks\Tag;
109

1110
final class HooksTest extends TestCase {
1211
/**
@@ -53,6 +52,8 @@ public function testCanGetReturnTypes(): void {
5352
$hooks = $this->getFilters();
5453
$hook = $hooks->find( 'wp_tag_cloud' );
5554

55+
self::assertInstanceOf( Hook::class, $hook );
56+
5657
$returnTypes = $hook->getDoc()->getReturnTypes();
5758
$expected = [
5859
'string',
@@ -66,6 +67,8 @@ public function testCanGetReturnTypeString(): void {
6667
$hooks = $this->getFilters();
6768
$hook = $hooks->find( 'wp_tag_cloud' );
6869

70+
self::assertInstanceOf( Hook::class, $hook );
71+
6972
$returnType = $hook->getDoc()->getReturnTypeString();
7073

7174
self::assertSame( 'string|string[]', $returnType );
@@ -75,17 +78,19 @@ public function testCanGetParams(): void {
7578
$hooks = $this->getFilters();
7679
$hook = $hooks->find( 'wp_tag_cloud' );
7780

81+
self::assertInstanceOf( Hook::class, $hook );
82+
7883
$params = $hook->getDoc()->getParams();
7984

8085
self::assertCount( 2, $params );
81-
self::assertInstanceOf( Tag::class, $params[0] );
82-
self::assertInstanceOf( Tag::class, $params[1] );
8386
}
8487

8588
public function testCanCountParams(): void {
8689
$hooks = $this->getFilters();
8790
$hook = $hooks->find( 'wp_tag_cloud' );
8891

92+
self::assertInstanceOf( Hook::class, $hook );
93+
8994
$count = $hook->getDoc()->countParams();
9095

9196
self::assertSame( 2, $count );
@@ -95,6 +100,8 @@ public function testCanGetSince(): void {
95100
$hooks = $this->getFilters();
96101
$hook = $hooks->find( 'wp_tag_cloud' );
97102

103+
self::assertInstanceOf( Hook::class, $hook );
104+
98105
$since = $hook->getDoc()->getSince();
99106

100107
self::assertSame( '2.3.0', $since );
@@ -148,7 +155,7 @@ private function getFilters(): Hooks {
148155
return Hooks::fromFile( $this->dataCoreFiles()['filters'][0] );
149156
}
150157

151-
private function getActions(): Hooks {
152-
return Hooks::fromFile( $this->dataCoreFiles()['actions'][0] );
153-
}
158+
// private function getActions(): Hooks {
159+
// return Hooks::fromFile( $this->dataCoreFiles()['actions'][0] );
160+
// }
154161
}

0 commit comments

Comments
 (0)