Skip to content

Commit

Permalink
added VerticalTab vendor to namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
robap committed Dec 16, 2011
1 parent 2256e63 commit a83164c
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -14,6 +14,6 @@
"php": ">=5.3.0"
},
"autoload": {
"psr-0": { "Pillow": "src/" }
"psr-0": { "VerticalTab\\Pillow": "src/" }
}
}
2 changes: 1 addition & 1 deletion src/Pillow/Chart.php → src/VerticalTab/Pillow/Chart.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Comps.php → src/VerticalTab/Pillow/Comps.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;

Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Date.php → src/VerticalTab/Pillow/Date.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \DateTime;

Expand Down
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Links.php → src/VerticalTab/Pillow/Links.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;

Expand Down
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

class Property
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Proxy.php → src/VerticalTab/Pillow/Proxy.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \Iterator;

Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Range.php → src/VerticalTab/Pillow/Range.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

class Range
{
Expand Down
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;
use \SplObjectStorage;
Expand Down
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;
use \SplObjectStorage;
Expand Down
8 changes: 4 additions & 4 deletions src/Pillow/Service.php → src/VerticalTab/Pillow/Service.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

class Service
{
Expand Down Expand Up @@ -50,7 +50,7 @@ public function getSearchResults($address, $cityStateZip) {
. 'address=' . urlencode( $address ) . '&'
. 'citystatezip=' . urlencode( $cityStateZip );

return $this->fetch($url, 'Pillow\SearchResults');
return $this->fetch($url, 'VerticalTab\Pillow\SearchResults');
}

/**
Expand All @@ -72,7 +72,7 @@ public function getChart($zpid, $width, $height, $unitType, $chartDuration) {
. 'height=' . $height . '&'
. 'chartDuration=' . $chartDuration;

return $this->fetch($url, 'Pillow\Chart');
return $this->fetch($url, 'VerticalTab\Pillow\Chart');
}

/**
Expand All @@ -89,7 +89,7 @@ public function getComps($zpid, $count) {
. 'count=' . $count
;

return $this->fetch($url, 'Pillow\Comps');
return $this->fetch($url, 'VerticalTab\Pillow\Comps');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Pillow/Xml.php → src/VerticalTab/Pillow/Xml.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

use \SimpleXMLElement;

Expand Down
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2009, Rob Apodaca
*/

namespace Pillow;
namespace VerticalTab\Pillow;

class Zestimate
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Pillow/ChartTest.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Chart;
use VerticalTab\Pillow\Chart;

class ChartTest extends PHPUnit_Framework_TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Pillow/CompsTest.php
Expand Up @@ -4,8 +4,8 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Comps;
use Pillow\Service;
use VerticalTab\Pillow\Comps;
use VerticalTab\Pillow\Service;

class CompsTest extends PHPUnit_Framework_TestCase
{
Expand All @@ -14,7 +14,7 @@ class CompsTest extends PHPUnit_Framework_TestCase
public $mockHttpClient;

public function setUp() {
$this->mockHttpClient = $this->getMock('\Pillow\HttpClient');
$this->mockHttpClient = $this->getMock('\VerticalTab\Pillow\HttpClient');
$this->service = new Service('foo', $this->mockHttpClient);

}
Expand Down
10 changes: 5 additions & 5 deletions tests/Pillow/PropertyTest.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Property;
use VerticalTab\Pillow\Property;

class PropertyTest extends PHPUnit_Framework_TestCase
{
Expand All @@ -16,7 +16,7 @@ class PropertyTest extends PHPUnit_Framework_TestCase
public function mapsCorrectly() {
$xml = simplexml_load_file(__DIR__ .'/responses/search_results.xml');
$results = $xml->xpath('response/results/result');
$prop = Property::createFromXml($results[0], $this->getMock('\Pillow\Service', null, array(), '', false));
$prop = Property::createFromXml($results[0], $this->getMock('\VerticalTab\Pillow\Service', null, array(), '', false));

$this->assertEquals('48749425', $prop->zpid);

Expand All @@ -27,15 +27,15 @@ public function mapsCorrectly() {
$this->assertEquals('47.63793', $prop->latitude);
$this->assertEquals('-122.347936', $prop->longitude);

$this->assertInstanceOf('\Pillow\Links', $prop->links);
$this->assertInstanceOf('\VerticalTab\Pillow\Links', $prop->links);
$this->assertEquals("http://www.zillow.com/homedetails/2114-Bigelow-Ave-N-Seattle-WA-98109/48749425_zpid/", $prop->links->homedetails);
$this->assertEquals('http://www.zillow.com/homedetails/charts/48749425_zpid,1year_chartDuration/?cbt=7522682882544325802%7E9%7EY2EzX18jtvYTCel5PgJtPY1pmDDLxGDZXzsfRy49lJvCnZ4bh7Fi9w**', $prop->links->graphsanddata);
$this->assertEquals('http://www.zillow.com/homes/map/48749425_zpid/', $prop->links->mapthishome);
$this->assertEquals('http://www.zillow.com/myestimator/Edit.htm?zprop=48749425', $prop->links->myestimator);
$this->assertEquals('http://www.zillow.com/homes/comps/48749425_zpid/', $prop->links->comparables);

$this->assertInstanceOf('\Pillow\Zestimate', $prop->zestimate);
$this->assertInstanceOf('\VerticalTab\Pillow\Zestimate', $prop->zestimate);

$this->assertInstanceOf('\Pillow\Proxy', $prop->chart);
$this->assertInstanceOf('\VerticalTab\Pillow\Proxy', $prop->chart);
}
}
6 changes: 3 additions & 3 deletions tests/Pillow/ProxyTest.php
Expand Up @@ -4,13 +4,13 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Service;
use Pillow\Proxy;
use VerticalTab\Pillow\Service;
use VerticalTab\Pillow\Proxy;

class ProxyTest extends PHPUnit_Framework_TestCase
{
public function setUp() {
$this->mockHttpClient = $this->getMock('\Pillow\HttpClient');
$this->mockHttpClient = $this->getMock('\VerticalTab\Pillow\HttpClient');
$this->service = new Service('foo', $this->mockHttpClient);

}
Expand Down
8 changes: 4 additions & 4 deletions tests/Pillow/ServiceTest.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Service;
use VerticalTab\Pillow\Service;

class ServiceTest extends PHPUnit_Framework_TestCase
{
Expand All @@ -13,7 +13,7 @@ class ServiceTest extends PHPUnit_Framework_TestCase
public $mockHttpClient;

public function setUp() {
$this->mockHttpClient = $this->getMock('\Pillow\HttpClient');
$this->mockHttpClient = $this->getMock('\VerticalTab\Pillow\HttpClient');
$this->service = new Service('foo', $this->mockHttpClient);

}
Expand All @@ -37,7 +37,7 @@ public function createResultSetWithOneResult() {
$results = $this->service->getSearchResults($address, $zip);

$this->assertEquals(1, count($results));
$this->assertInstanceOf('\Pillow\Property', $results->current());
$this->assertInstanceOf('\VerticalTab\Pillow\Property', $results->current());
}

/**
Expand All @@ -60,7 +60,7 @@ public function createsChart() {

$chart = $this->service->getChart($zpid, $width, $height, $unitType, $chartDuration);

$this->assertInstanceOf('\Pillow\Chart', $chart);
$this->assertInstanceOf('\VerticalTab\Pillow\Chart', $chart);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/Pillow/ZestimateTest.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

use Pillow\Zestimate;
use VerticalTab\Pillow\Zestimate;

class ZestimateTest extends PHPUnit_Framework_TestCase
{
Expand All @@ -23,6 +23,6 @@ public function mapsCorrectly() {
$this->assertEquals('11/03/2009', $z->lastUpdated);
$this->assertEquals('-41500', $z->thirtyDayChange);
$this->assertEquals('0', $z->percentile);
$this->assertInstanceOf('\Pillow\Range', $z->range);
$this->assertInstanceOf('\VerticalTab\Pillow\Range', $z->range);
}
}
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Expand Up @@ -4,7 +4,7 @@
* @copyright Copyright (c) 2011, Rob Apodaca
*/

namespace PillowTest;
namespace VerticalTab\PillowTest;

class Autoloader
{
Expand Down

0 comments on commit a83164c

Please sign in to comment.