Skip to content

Commit

Permalink
Moved CrawlerException to Search. Updated code to fit SensioLabs. Fix…
Browse files Browse the repository at this point in the history
…ed Travis CI.
  • Loading branch information
picamator committed Oct 31, 2016
1 parent 51d7f4c commit e6b248b
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 22 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -3,8 +3,7 @@ php:
- "7.0"

before_script:
- pecl install mongodb
- echo "extension=mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer remove mongodb/mongodb
- composer install

script:
Expand Down
2 changes: 1 addition & 1 deletion dev/tests/phpunit.xml.dist
Expand Up @@ -2,7 +2,7 @@

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
bootstrap="./../../../vendor/autoload.php"
bootstrap="./../../vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand Down
Expand Up @@ -76,7 +76,7 @@ public function testGet()
}

/**
* @expectedException \Picamator\PlaceSearchApi\Model\Exception\CrawlerException
* @expectedException \Picamator\PlaceSearchApi\Search\Exception\CrawlerException
*/
public function testFailedHttpStatusGet()
{
Expand All @@ -100,7 +100,7 @@ public function testFailedHttpStatusGet()
}

/**
* @expectedException \Picamator\PlaceSearchApi\Model\Exception\CrawlerException
* @expectedException \Picamator\PlaceSearchApi\Search\Exception\CrawlerException
*/
public function testFailedResultStatusGet()
{
Expand Down Expand Up @@ -135,7 +135,7 @@ public function testFailedResultStatusGet()
}

/**
* @expectedException \Picamator\PlaceSearchApi\Model\Exception\CrawlerException
* @expectedException \Picamator\PlaceSearchApi\Search\Exception\CrawlerException
*/
public function testFailedGet()
{
Expand All @@ -150,7 +150,7 @@ public function testFailedGet()
}

/**
* @expectedException \Picamator\PlaceSearchApi\Model\Exception\CrawlerException
* @expectedException \Picamator\PlaceSearchApi\Search\Exception\CrawlerException
*/
public function testFailedEncodeGet()
{
Expand Down
Expand Up @@ -2,7 +2,7 @@
namespace Picamator\PlaceSearchApi\Tests\Unit\Engine\GoogleSearchPlace;

use Picamator\PlaceSearchApi\Engine\GoogleSearchPlace\PlaceRepository;
use Picamator\PlaceSearchApi\Model\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Search\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Model\Exception\RuntimeException;
use Picamator\PlaceSearchApi\Tests\Unit\BaseTest;

Expand Down
3 changes: 1 addition & 2 deletions src/App/Service/ServiceProvider.php
Expand Up @@ -11,7 +11,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;

/**
Expand Down Expand Up @@ -58,7 +57,7 @@ public function boot(Application $app)
if ($code === 404) {
return $errorController->getNotFound($request, $app, $e, $code);
}

return $errorController->getInternalServer($request, $app, $e, $code);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/GoogleSearchPlace/Http/Crawler.php
Expand Up @@ -5,7 +5,7 @@

use Picamator\PlaceSearchApi\Search\Api\Http\ClientInterface;
use Picamator\PlaceSearchApi\Search\Api\Http\CrawlerInterface;
use Picamator\PlaceSearchApi\Model\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Search\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Model\Exception\InvalidArgumentException;
use Psr\Http\Message\ResponseInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Engine/GoogleSearchPlace/PlaceRepository.php
Expand Up @@ -8,7 +8,7 @@
use Picamator\PlaceSearchApi\Search\Api\Http\CrawlerInterface;
use Picamator\PlaceSearchApi\Model\Api\MapperInterface;
use Picamator\PlaceSearchApi\Model\Api\PlaceRepositoryInterface;
use Picamator\PlaceSearchApi\Model\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Search\Exception\CrawlerException;
use Picamator\PlaceSearchApi\Model\Exception\RepositoryException;
use Picamator\PlaceSearchApi\Model\Exception\RuntimeException;

Expand Down
2 changes: 1 addition & 1 deletion src/Search/Api/Http/CrawlerInterface.php
Expand Up @@ -15,7 +15,7 @@
*
* @return array
*
* @throws CrawlerExceptionException
* @throws CrawlerException
*/
public function get(array $query) : array;
}
@@ -1,5 +1,5 @@
<?php
namespace Picamator\PlaceSearchApi\Model\Exception;
namespace Picamator\PlaceSearchApi\Search\Exception;

/**
* Crawler exception
Expand Down
8 changes: 0 additions & 8 deletions web/.htaccess

This file was deleted.

0 comments on commit e6b248b

Please sign in to comment.