Skip to content

Commit 2f6287c

Browse files
committed
No need for a separate Tests namespace methinks
1 parent 5b8a221 commit 2f6287c

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"autoload-dev": {
2929
"psr-4": {
30-
"Scriptotek\\Tests\\": "tests/"
30+
"Scriptotek\\Sru\\": "tests/"
3131
}
3232
},
3333
"minimum-stability": "dev"

tests/ClientTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
<?php namespace Scriptotek\Tests;
1+
<?php namespace Scriptotek\Sru;
22

33
use \Guzzle\Http\Message\Response as HttpResponse;
44
use \Mockery as m;
5-
use \Scriptotek\Sru\Client as SruClient;
65

76
class ClientTest extends TestCase {
87

@@ -14,14 +13,14 @@ class ClientTest extends TestCase {
1413

1514
public function testUrlTo()
1615
{
17-
$sru1 = new SruClient($this->url);
16+
$sru1 = new Client($this->url);
1817
$expectedUrl1 = $this->url . '?version=1.1&operation=searchRetrieve&recordSchema=marcxml&maximumRecords=10&query=isbn%3D123';
1918
$expectedUrl2 = $this->url . '?version=1.1&operation=searchRetrieve&recordSchema=marcxml&maximumRecords=50&query=isbn%3D123&startRecord=2';
2019

21-
$sru3 = new SruClient($this->url, array('schema' => 'CUSTOMSCHEMA'));
20+
$sru3 = new Client($this->url, array('schema' => 'CUSTOMSCHEMA'));
2221
$expectedUrl3 = $this->url . '?version=1.1&operation=searchRetrieve&recordSchema=CUSTOMSCHEMA&maximumRecords=10&query=isbn%3D123';
2322

24-
$sru4 = new SruClient($this->url, array('version' => '0.9'));
23+
$sru4 = new Client($this->url, array('version' => '0.9'));
2524
$expectedUrl4 = $this->url . '?version=0.9&operation=searchRetrieve&recordSchema=marcxml&maximumRecords=10&query=isbn%3D123';
2625

2726
$this->assertEquals($expectedUrl1, $sru1->urlTo('isbn=123'));
@@ -33,7 +32,7 @@ public function testUrlTo()
3332
public function testSearch()
3433
{
3534
$http = $this->basicHttpMock($this->simple_response);
36-
$sru = new SruClient($this->url, null, $http);
35+
$sru = new Client($this->url, null, $http);
3736

3837
$this->assertXmlStringEqualsXmlString(
3938
$this->simple_response,
@@ -59,7 +58,7 @@ public function testSearchWithAuth()
5958
$options = array(
6059
'credentials' => $credentials
6160
);
62-
$sru = new SruClient($this->url, $options, $http);
61+
$sru = new Client($this->url, $options, $http);
6362

6463
$sru->search('test');
6564
}

tests/ResponseTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
<?php namespace Scriptotek\Tests;
1+
<?php namespace Scriptotek\Sru;
22

33
use \Guzzle\Http\Message\Response as HttpResponse;
44
use \Mockery as m;
5-
use \Scriptotek\Sru\Response as SruResponse;
65

76
class ResponseTest extends TestCase {
87

98
public function testParse()
109
{
11-
$res = new SruResponse('<?xml version="1.0" encoding="UTF-8" ?>
10+
$res = new Response('<?xml version="1.0" encoding="UTF-8" ?>
1211
<srw:searchRetrieveResponse
1312
xmlns:srw="http://www.loc.gov/zing/srw/"
1413
xmlns:xcql="http://www.loc.gov/zing/cql/xcql/"

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php namespace Scriptotek\Tests;
1+
<?php namespace Scriptotek\Sru;
22

33
use \Guzzle\Http\Message\Response as HttpResponse;
44
use \Mockery as m;

0 commit comments

Comments
 (0)