diff --git a/src/mongo/delegates/Views.class.php b/src/mongo/delegates/Views.class.php index 0e7fe06e..f405a4f4 100644 --- a/src/mongo/delegates/Views.class.php +++ b/src/mongo/delegates/Views.class.php @@ -11,7 +11,6 @@ use \MongoDB\Driver\ReadPreference; use \MongoDB\Collection; use Tripod\Mongo\JobGroup; -use Monolog\Logger; /** * Class Views @@ -29,7 +28,7 @@ class Views extends CompositeBase * @param null $stat * @param string $readPreference */ - function __construct($storeName, Collection $collection,$defaultContext,$stat=null,$readPreference = ReadPreference::RP_PRIMARY) // todo: $collection -> podname + public function __construct($storeName, Collection $collection,$defaultContext,$stat=null,$readPreference = ReadPreference::RP_PRIMARY) // todo: $collection -> podname { $this->storeName = $storeName; $this->labeller = new Labeller(); @@ -311,8 +310,10 @@ public function generateViews($resources,$context=null) foreach ($resources as $resource) { $resourceAlias = $this->labeller->uri_to_alias($resource); - $this->getLogger()->warning('Generating views', ['store' => $this->storeName, - '_id' => $resourceAlias]); + $this->getLogger()->warning( + 'Generating views', + ['store' => $this->storeName, '_id' => $resourceAlias] + ); // delete any views this resource is involved in. It's type may have changed so it's not enough just to regen it with it's new type below. foreach (Config::getInstance()->getViewSpecifications($this->storeName) as $type=>$spec) { diff --git a/test/unit/mongo/MongoTripodConfigTest.php b/test/unit/mongo/MongoTripodConfigTest.php index e79f1ac0..ab88b968 100644 --- a/test/unit/mongo/MongoTripodConfigTest.php +++ b/test/unit/mongo/MongoTripodConfigTest.php @@ -977,7 +977,7 @@ public function testGetAllTypesInSpecifications() $this->assertEquals( 12, count($types), - 'There should be 11 types based on the configured view, table and search specifications in config.json' + 'There should be 12 types based on the configured view, table and search specifications in config.json' ); $expectedValues = [ 'acorn:Resource', diff --git a/test/unit/mongo/MongoTripodViewsTest.php b/test/unit/mongo/MongoTripodViewsTest.php index 5620f6cc..e94fcfd0 100644 --- a/test/unit/mongo/MongoTripodViewsTest.php +++ b/test/unit/mongo/MongoTripodViewsTest.php @@ -4,7 +4,6 @@ require_once 'src/mongo/Driver.class.php'; require_once 'src/mongo/delegates/Views.class.php'; -use \Tripod\Mongo\Composites\Views; use \MongoDB\Client; use Tripod\ExtendedGraph;