Skip to content

Commit 2ad2c30

Browse files
committed
fix namespace
1 parent 1aae221 commit 2ad2c30

15 files changed

+37
-29
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ instantiate a URL factory object:
3737
```php
3838
<?php
3939
use Aura\Uri\Url\Factory as UrlFactory;
40-
use Aura\Uri\PublicSuffixList;
4140

4241
$psl = new PublicSuffixList(require '/path/to/Aura.Uri/data/public-suffix-list.php');
4342
$url_factory = new UrlFactory($_SERVER, $psl);

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"phpunit/phpunit": "^8"
1818
},
1919
"autoload": {
20-
"psr-0": {
21-
"Aura\\Uri": "src/"
20+
"psr-4": {
21+
"Aura\\Uri\\": "src/"
2222
}
2323
},
2424
"conflict": {

phpunit.xml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php">
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
5+
bootstrap="vendor/autoload.php"
6+
backupGlobals="true" colors="true"
7+
>
8+
<php>
9+
<ini name="display_errors" value="1" />
10+
<ini name="display_startup_errors" value="1" />
11+
</php>
12+
313
<testsuites>
414
<testsuite name="testsuite for Uri">
515
<directory>./tests/Aura/Uri</directory>
616
</testsuite>
717
</testsuites>
818
<filter>
919
<whitelist>
10-
<directory suffix=".php">src/Aura/Uri</directory>
20+
<directory suffix=".php">src</directory>
1121
</whitelist>
1222
</filter>
1323
</phpunit>

src/Aura/Uri/Host.php src/Host.php

File renamed without changes.

src/Aura/Uri/Path.php src/Path.php

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Aura/Uri/Url.php src/Url.php

File renamed without changes.

src/Aura/Uri/Url/Factory.php src/Url/Factory.php

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Aura\Uri\Query;
1616
use Aura\Uri\Host;
1717
use Aura\Uri\PublicSuffixList;
18-
use ArrayObject;
1918

2019
/**
2120
*

tests/Aura/Uri/CheckPublicSuffixTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class CheckPublicSuffixTest extends TestCase
1414
{
1515
/**
16-
* @var \Aura\Uri\PublicSuffixList
16+
* @var PublicSuffixList
1717
*/
1818
protected $psl;
1919

tests/Aura/Uri/HostTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class HostTest extends TestCase
88
{
99
/**
10-
* @var \Aura\Uri\Host
10+
* @var Host
1111
*/
1212
protected $host;
1313

tests/Aura/Uri/PathTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function tearDown() : void
3434
}
3535

3636
/**
37-
* @covers \Aura\Uri\Path::__toString
37+
* @covers Path::__toString
3838
*/
3939
public function test__toString()
4040
{
@@ -45,7 +45,7 @@ public function test__toString()
4545
}
4646

4747
/**
48-
* @covers \Aura\Uri\Path::setFromString
48+
* @covers Path::setFromString
4949
*/
5050
public function testSetFromString()
5151
{
@@ -61,8 +61,8 @@ public function testSetFromString()
6161
}
6262

6363
/**
64-
* @covers \Aura\Uri\Path::setFormat
65-
* @covers \Aura\Uri\Path::getFormat
64+
* @covers Path::setFormat
65+
* @covers Path::getFormat
6666
*/
6767
public function testSetAndGetFormat()
6868
{

tests/Aura/Uri/PublicSuffixListTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class PublicSuffixListTest extends TestCase
99
{
1010
/**
11-
* @var \Aura\Uri\PublicSuffixList
11+
* @var PublicSuffixList
1212
*/
1313
protected $psl;
1414

tests/Aura/Uri/QueryTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function tearDown() : void
3434
}
3535

3636
/**
37-
* @covers \Aura\Uri\Query::__toString
37+
* @covers Query::__toString
3838
*/
3939
public function test__toString()
4040
{
@@ -45,7 +45,7 @@ public function test__toString()
4545
}
4646

4747
/**
48-
* @covers \Aura\Uri\Query::setFromString
48+
* @covers Query::setFromString
4949
*/
5050
public function testSetFromString()
5151
{

tests/Aura/Uri/UrlTest.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Aura\Uri;
33

4-
use PHPUnit\Framework\TestCase;
54
use Aura\Uri\Url\Factory as UrlFactory;
5+
use PHPUnit\Framework\TestCase;
66

77
/**
88
* Test class for Url.
@@ -73,7 +73,7 @@ public function test__construct()
7373
}
7474

7575
/**
76-
* @covers \Aura\Uri\Url::__toString
76+
* @covers Url::__toString
7777
*/
7878
public function test__toString()
7979
{
@@ -82,7 +82,7 @@ public function test__toString()
8282
}
8383

8484
/**
85-
* @covers \Aura\Uri\Url::__get
85+
* @covers Url::__get
8686
*/
8787
public function test__get()
8888
{
@@ -101,7 +101,7 @@ public function test__get()
101101
}
102102

103103
/**
104-
* @covers \Aura\Uri\Url::get
104+
* @covers Url::get
105105
*/
106106
public function testGet()
107107
{
@@ -111,7 +111,7 @@ public function testGet()
111111
}
112112

113113
/**
114-
* @covers \Aura\Uri\Url::getFull
114+
* @covers Url::getFull
115115
*/
116116
public function testGetFull()
117117
{
@@ -120,7 +120,7 @@ public function testGetFull()
120120
}
121121

122122
/**
123-
* @covers \Aura\Uri\Url::getSchemeless
123+
* @covers Url::getSchemeless
124124
*/
125125
public function testGetSchemeless()
126126
{
@@ -130,7 +130,7 @@ public function testGetSchemeless()
130130
}
131131

132132
/**
133-
* @covers \Aura\Uri\Url::setScheme
133+
* @covers Url::setScheme
134134
*/
135135
public function testSetScheme()
136136
{
@@ -140,7 +140,7 @@ public function testSetScheme()
140140
}
141141

142142
/**
143-
* @covers \Aura\Uri\Url::setUser
143+
* @covers Url::setUser
144144
*/
145145
public function testSetUser()
146146
{
@@ -150,7 +150,7 @@ public function testSetUser()
150150
}
151151

152152
/**
153-
* @covers \Aura\Uri\Url::setPass
153+
* @covers Url::setPass
154154
*/
155155
public function testSetPass()
156156
{
@@ -160,7 +160,7 @@ public function testSetPass()
160160
}
161161

162162
/**
163-
* @covers \Aura\Uri\Url::setHost
163+
* @covers Url::setHost
164164
*/
165165
public function testSetHost()
166166
{
@@ -170,7 +170,7 @@ public function testSetHost()
170170
}
171171

172172
/**
173-
* @covers \Aura\Uri\Url::setPort
173+
* @covers Url::setPort
174174
*/
175175
public function testSetPort()
176176
{
@@ -180,7 +180,7 @@ public function testSetPort()
180180
}
181181

182182
/**
183-
* @covers \Aura\Uri\Url::setPath
183+
* @covers Url::setPath
184184
*/
185185
public function testSetPath()
186186
{
@@ -190,7 +190,7 @@ public function testSetPath()
190190
}
191191

192192
/**
193-
* @covers \Aura\Uri\Url::setQuery
193+
* @covers Url::setQuery
194194
*/
195195
public function testSetQuery()
196196
{
@@ -200,7 +200,7 @@ public function testSetQuery()
200200
}
201201

202202
/**
203-
* @covers \Aura\Uri\Url::setFragment
203+
* @covers Url::setFragment
204204
*/
205205
public function testSetFragment()
206206
{

0 commit comments

Comments
 (0)