Skip to content

Commit 5696498

Browse files
committed
Moved exception to its own namespace
1 parent 17dda62 commit 5696498

3 files changed

Lines changed: 24 additions & 21 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Dhii\Modular\Module\Exception;
4+
5+
use Dhii\Modular\Module\ModuleAwareInterface;
6+
use Dhii\Exception\ThrowableInterface;
7+
8+
/**
9+
* Represents an exception that is thrown in relation to a module.
10+
*
11+
* @since [*next-version*]
12+
*/
13+
interface ModuleExceptionInterface extends
14+
ThrowableInterface,
15+
ModuleAwareInterface
16+
{
17+
}

‎src/ModuleExceptionInterface.php‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

test/unit/ModuleExceptionInterfaceTest.php renamed to test/unit/Exception/ModuleExceptionInterfaceTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace Dhii\Modular\UnitTest\Module;
3+
namespace Dhii\Modular\UnitTest\Exception;
44

5-
use Dhii\Modular\Module\ModuleExceptionInterface;
5+
use Dhii\Modular\Module\Exception\ModuleExceptionInterface as TestSubject;
66
use Xpmock\TestCase;
77

88
/**
9-
* Tests {@see Dhii\Modular\Module\ModuleExceptionInterface}.
9+
* Tests {@see TestSubject}.
1010
*
1111
* @since [*next-version*]
1212
*/
@@ -17,14 +17,14 @@ class ModuleExceptionInterfaceTest extends TestCase
1717
*
1818
* @since [*next-version*]
1919
*/
20-
const TEST_SUBJECT_CLASSNAME = 'Dhii\\Modular\\Module\\ModuleExceptionInterface';
20+
const TEST_SUBJECT_CLASSNAME = 'Dhii\Modular\Module\Exception\ModuleExceptionInterface';
2121

2222
/**
2323
* Creates a new instance of the test subject.
2424
*
2525
* @since [*next-version*]
2626
*
27-
* @return ModuleExceptionInterface
27+
* @return TestSubject
2828
*/
2929
public function createInstance()
3030
{
@@ -52,12 +52,12 @@ public function testCanBeCreated()
5252
);
5353

5454
$this->assertInstanceOf(
55-
'Dhii\\Modular\\Module\\ModuleAwareInterface',
55+
'Dhii\Modular\Module\ModuleAwareInterface',
5656
$subject,
5757
'Subject does not implement required interface'
5858
);
5959
$this->assertInstanceOf(
60-
'Dhii\\Modular\\Module\\ModuleKeyAwareInterface',
60+
'Dhii\Modular\Module\ModuleKeyAwareInterface',
6161
$subject,
6262
'Subject does not implement required interface'
6363
);

0 commit comments

Comments
 (0)