Passed
Branch master (1e39e8)
by Caen
03:01
created

EnsureCommandsFollowNamingConventionTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
3
namespace Hyde\Framework\Testing\Unit;
4
5
use Hyde\Testing\TestCase;
6
7
class EnsureCommandsFollowNamingConventionTest extends TestCase
8
{
9
    public function test_ensure_commands_follow_naming_convention()
10
    {
11
        $files = glob('vendor/hyde/framework/src/Commands/*.php');
12
13
        if (empty($files)) {
14
            $this->markTestSkipped('No commands found.');
15
        }
16
17
        foreach ($files as $filepath) {
18
            $filename = basename($filepath, '.php');
19
            $this->assertStringStartsWith('Hyde', $filename);
20
            $this->assertStringEndsWith('Command', $filename);
21
        }
22
    }
23
}
24